]> git.lizzy.rs Git - rust.git/commitdiff
[VSCode] Fix syntax highlighting
authorbjorn3 <bjorn3@users.noreply.github.com>
Sat, 1 Feb 2020 12:12:39 +0000 (13:12 +0100)
committerbjorn3 <bjorn3@users.noreply.github.com>
Sat, 1 Feb 2020 12:12:39 +0000 (13:12 +0100)
Fixes #2969

editors/code/src/color_theme.ts

index cbad47f3571de67c5c3a11a29c5dd51ba514539e..e4d20490b1fa5b2ac8e9ed78fbbd6b50e36917e7 100644 (file)
@@ -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) {