diff --git a/tree-view-sample/src/jsonOutline.ts b/tree-view-sample/src/jsonOutline.ts index 2aed10f5..20983b9b 100644 --- a/tree-view-sample/src/jsonOutline.ts +++ b/tree-view-sample/src/jsonOutline.ts @@ -84,7 +84,7 @@ export class JsonOutlineProvider implements vscode.TreeDataProvider { this.text = ''; this.tree = null; this.editor = vscode.window.activeTextEditor; - if (this.editor && this.editor.document && this.editor.document.languageId === 'json') { + if (this.editor && this.editor.document) { this.text = this.editor.document.getText(); this.tree = json.parseTree(this.text); }