From f4431d2acc8e5dd25ed41c0c8af97050a7a230d1 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sat, 1 Feb 2020 13:12:39 +0100 Subject: [VSCode] Fix syntax highlighting Fixes #2969 --- editors/code/src/color_theme.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'editors/code/src') diff --git a/editors/code/src/color_theme.ts b/editors/code/src/color_theme.ts index cbad47f35..e4d20490b 100644 --- a/editors/code/src/color_theme.ts +++ b/editors/code/src/color_theme.ts @@ -28,7 +28,9 @@ export class ColorTheme { static fromRules(rules: TextMateRule[]): ColorTheme { const res = new ColorTheme(); for (const rule of rules) { - const scopes = typeof rule.scope === 'string' + const scopes = typeof rule.scope === 'undefined' + ? [] + : typeof rule.scope === 'string' ? [rule.scope] : rule.scope; for (const scope of scopes) { -- cgit v1.2.3