Skip to content

Commit

Permalink
remove dependency on hub extension
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Jun 9, 2019
1 parent d5e1c61 commit 3293670
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/application-extension/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
ILabStatus,
ILayoutRestorer,
IRouter,
ConnectionLost,
JupyterFrontEnd,
JupyterFrontEndPlugin,
JupyterLab,
Expand Down Expand Up @@ -74,13 +75,14 @@ namespace CommandIDs {
*/
const main: JupyterFrontEndPlugin<void> = {
id: '@jupyterlab/application-extension:main',
requires: [ICommandPalette, IConnectionLost, IRouter, IWindowResolver],
requires: [ICommandPalette, IRouter, IWindowResolver],
optional: [IConnectionLost],
activate: (
app: JupyterFrontEnd,
palette: ICommandPalette,
connectionLost: IConnectionLost,
router: IRouter,
resolver: IWindowResolver
resolver: IWindowResolver,
connectionLost: IConnectionLost | undefined
) => {
if (!(app instanceof JupyterLab)) {
throw new Error(`${main.id} must be activated in JupyterLab.`);
Expand Down Expand Up @@ -111,7 +113,8 @@ const main: JupyterFrontEndPlugin<void> = {
});

// If the connection to the server is lost, handle it with the
// connection lost token.
// connection lost handler.
connectionLost = connectionLost || ConnectionLost;
app.serviceManager.connectionFailure.connect(connectionLost);

const builder = app.serviceManager.builder;
Expand Down

0 comments on commit 3293670

Please sign in to comment.