mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
parent
fc0a8c14dc
commit
f4431d2acc
1 changed files with 3 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue