From 2f6e491e008a37dbff43b9a26b5281e0c68ddbbf Mon Sep 17 00:00:00 2001 From: Alexander Drozdov Date: Fri, 6 Mar 2020 00:26:15 +0200 Subject: [PATCH] fix --- src/components/parser/Parser.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/parser/Parser.ts b/src/components/parser/Parser.ts index fea610c7..0cfa24b3 100644 --- a/src/components/parser/Parser.ts +++ b/src/components/parser/Parser.ts @@ -398,8 +398,6 @@ function parseModifiers (expected: string[]) { mod = tryFindModifier(stat.value) if (mod) { - // @TODO: IMPORTANT! distinguish between local and global mods - if (modType == null) { for (const type of mod.modInfo.types) { if ( @@ -414,7 +412,10 @@ function parseModifiers (expected: string[]) { } } - if (mod.modInfo.types.find(type => type.name === modType)) { + if ( + expected.includes(modType!) && + mod.modInfo.types.find(type => type.name === modType) + ) { mod.type = modType! item.modifiers.push(mod) stat = statIterator.next(true)