Skip to content

Commit

Permalink
Add a warning message to console when custom nav bar header been over…
Browse files Browse the repository at this point in the history
…ridden

Signed-off-by: Yulong Ruan <[email protected]>
  • Loading branch information
ruanyl committed Oct 18, 2023
1 parent 92d1251 commit ae21637
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ export class ChromeService {
public setup() {
return {
registerCollapsibleNavHeader: (render: CollapsibleNavHeaderRender) => {
if (this.collapsibleNavHeaderRender) {
// eslint-disable-next-line no-console
console.warn(
'[ChromeService] An existing custom collapsible navigation bar header render has been overridden.'
);
}
this.collapsibleNavHeaderRender = render;
},
};
Expand Down

0 comments on commit ae21637

Please sign in to comment.