Skip to content

Commit

Permalink
Fix strict null check errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
afshin committed Dec 23, 2019
1 parent b7fabfa commit 6e0b32e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/application-extension/src/index.tsx
Expand Up @@ -282,10 +282,10 @@ const tree: JupyterFrontEndPlugin<JupyterFrontEnd.ITreeResolver> = {
const treeMatch = args.path.match(treePattern);
const workspaceMatch = args.path.match(workspacePattern);
const match = treeMatch || workspaceMatch;
const file = match ? decodeURI(match[1]) : undefined;
const file = match ? decodeURI(match[1]) : '';
const workspace = PathExt.basename(resolver.name);
const query = URLExt.queryStringToObject(args.search ?? '');
const browser = query['file-browser-path'];
const browser = query['file-browser-path'] || '';

// Remove the file browser path from the query string.
delete query['file-browser-path'];
Expand Down
2 changes: 1 addition & 1 deletion packages/application/src/frontend.ts
Expand Up @@ -334,7 +334,7 @@ export namespace JupyterFrontEnd {
export namespace ITreeResolver {
/**
* The browser and file paths if the tree resolver encountered and handled
* a tree URL or `null` if not.
* a tree URL or `null` if not. Empty string paths should be ignored.
*/
export type Paths = { browser: string; file: string } | null;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/filebrowser-extension/src/index.ts
Expand Up @@ -230,7 +230,8 @@ async function activateFactory(
manager: docManager,
driveName: options.driveName || '',
refreshInterval: options.refreshInterval,
state: options.state === null ? undefined : options.state || state
state:
options.state === null ? undefined : options.state || state || undefined
});
const restore = options.restore;
const widget = new FileBrowser({ id, model, restore });
Expand Down

0 comments on commit 6e0b32e

Please sign in to comment.