Skip to content

Commit 614e535

Browse files
committed
Fix zignd#66 - Missing null check on the result of a RegExp match
1 parent a46ac59 commit 614e535

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function provideCompletionItemsGenerator(languageSelector: string, classMatchReg
7878

7979
// Check if the cursor is on a class attribute and retrieve all the css rules in this class attribute
8080
const rawClasses: RegExpMatchArray = text.match(classMatchRegex);
81-
if (rawClasses.length === 1) {
81+
if (!rawClasses || rawClasses.length === 1) {
8282
return [];
8383
}
8484

0 commit comments

Comments
 (0)