Skip to content

Commit

Permalink
fix texteditor access
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanck committed Nov 17, 2021
1 parent 96bffd0 commit 80a8535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<Terraf
}),
vscode.window.onDidChangeVisibleTextEditors(async (editors: vscode.TextEditor[]) => {
const textEditor = editors.find((ed) => !!ed.viewColumn);
if (textEditor.document === undefined) {
if (textEditor?.document === undefined) {
return;
}
await updateTerraformStatusBar(textEditor.document.uri);
Expand Down

0 comments on commit 80a8535

Please sign in to comment.