Skip to content

Commit

Permalink
Prevent Theia from crashing by checking if extensions.onDidChange exists
Browse files Browse the repository at this point in the history
Signed-off-by: Fred Bricon <[email protected]>
  • Loading branch information
fbricon committed Mar 29, 2019
1 parent d05978e commit 4d9c84b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,11 @@ export function activate(context: ExtensionContext): Promise<ExtensionAPI> {
}
};
context.subscriptions.push(workspace.registerTextDocumentContentProvider('jdt', provider));
extensions.onDidChange(() => {
onExtensionChange(extensions.all);
});
if (extensions.onDidChange) {//Theia doesn't support this API yet
extensions.onDidChange(() => {
onExtensionChange(extensions.all);
});
}
excludeProjectSettingsFiles();
});

Expand Down

0 comments on commit 4d9c84b

Please sign in to comment.