Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

Commit 529547c

Browse files
authored
check if panel view is supported by the instance (#860)
1 parent fef8b98 commit 529547c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

template/src/extension.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const DUMMY_CTX = {
2323
const hasImplementationsField = once(() => new API().hasImplementationsField())
2424

2525
/**
26-
* Create the panel for implementations.
26+
* Create the panel for implementations (if supported by the Sourcegraph instance).
2727
*
2828
* Makes sure to only create the panel once per session.
2929
*/
@@ -32,6 +32,11 @@ const createImplementationPanel = (
3232
selector: sourcegraph.DocumentSelector,
3333
providers: SourcegraphProviders
3434
): void => {
35+
// `createPanelView` was removed in https://github.com/sourcegraph/sourcegraph/pull/50451
36+
if (!sourcegraph.app.createPanelView) {
37+
return
38+
}
39+
3540
const implementationsPanelID = 'implementations_LANGID'
3641
const implementationsPanel = sourcegraph.app.createPanelView(implementationsPanelID)
3742

0 commit comments

Comments
 (0)