Skip to content

Commit

Permalink
Backport PR jupyterlab#12521: Handle missing preferredPath from the…
Browse files Browse the repository at this point in the history
… page config
  • Loading branch information
echarles authored and meeseeksmachine committed May 4, 2022
1 parent 2b1a963 commit edb9bf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/filebrowser/src/crumbs.ts
Expand Up @@ -73,8 +73,8 @@ export class BreadCrumbs extends Widget {
this.addClass(BREADCRUMB_CLASS);
this._crumbs = Private.createCrumbs();
this._crumbSeps = Private.createCrumbSeparators();
this._hasPreferred =
PageConfig.getOption('preferredPath') !== '/' ? true : false;
const hasPreferred = PageConfig.getOption('preferredPath');
this._hasPreferred = hasPreferred && hasPreferred !== '/' ? true : false;
if (this._hasPreferred) {
this.node.appendChild(this._crumbs[Private.Crumb.Preferred]);
}
Expand Down

0 comments on commit edb9bf2

Please sign in to comment.