From 9a7db62d538041eca1426f06ee655978a1c757e5 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 5 Apr 2021 04:53:53 -0500 Subject: [PATCH] fix: handle no textEditor path --- lib/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/main.ts b/lib/main.ts index a7238fe8..aeacd61f 100644 --- a/lib/main.ts +++ b/lib/main.ts @@ -138,7 +138,7 @@ export function provideLinter() { scope: 'file', lintsOnChange: true, lint: async (textEditor: TextEditor) => { - if (config.ignoreTypings && textEditor.getPath().toLowerCase().endsWith('.d.ts')) { + if (config.ignoreTypings && (textEditor.getPath() ?? "").toLowerCase().endsWith('.d.ts')) { return []; }