Skip to content

Commit ea2b559

Browse files
authored
Fix initialization (#54)
* Fix initialization * Linter * Remove browser check test We have UI tests, that's enough * Debug * Update snapshots
1 parent 79c62cf commit ea2b559

File tree

8 files changed

+5
-5
lines changed

8 files changed

+5
-5
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
3939
jupyter labextension list
4040
jupyter labextension list 2>&1 | grep -ie "jupyterlab-unfold.*OK"
41-
python -m jupyterlab.browser_check
4241
4342
- name: Package the extension
4443
run: |
@@ -80,7 +79,6 @@ jobs:
8079
8180
jupyter labextension list
8281
jupyter labextension list 2>&1 | grep -ie "jupyterlab-unfold.*OK"
83-
python -m jupyterlab.browser_check --no-browser-test
8482
8583
integration-tests:
8684
name: Integration tests

src/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,16 @@ const fileBrowserFactory: JupyterFrontEndPlugin<IFileBrowserFactory> = {
6969
widget.listing.singleClickToUnfold = setting.get('singleClickToUnfold')
7070
.composite as boolean;
7171
});
72-
72+
7373
// check the url in iframe and open
7474
app.restored.then(() => {
7575
const windowPathname = window.location.pathname;
76-
let treeIndex = windowPathname.indexOf('/tree/');
76+
const treeIndex = windowPathname.indexOf('/tree/');
7777
let path = windowPathname.substring(treeIndex + '/tree/'.length);
7878
path = decodeURIComponent(path);
79-
docManager.open(path);
79+
if (path) {
80+
docManager.open(path);
81+
}
8082
});
8183

8284
// Track the newly created file browser.
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)