Skip to content

Commit f4431d2

Browse files
committed
[VSCode] Fix syntax highlighting
Fixes #2969
1 parent fc0a8c1 commit f4431d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

editors/code/src/color_theme.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export class ColorTheme {
2828
static fromRules(rules: TextMateRule[]): ColorTheme {
2929
const res = new ColorTheme();
3030
for (const rule of rules) {
31-
const scopes = typeof rule.scope === 'string'
31+
const scopes = typeof rule.scope === 'undefined'
32+
? []
33+
: typeof rule.scope === 'string'
3234
? [rule.scope]
3335
: rule.scope;
3436
for (const scope of scopes) {

0 commit comments

Comments
 (0)