Selaa lähdekoodia

Fix isReservedName method

I think the line check if(!this.options.reservedStrings.length) should be change to if (!this.options.reservedNames || !this.options.reservedNames.length)
Vinh Le 5 vuotta sitten
vanhempi
commit
ca97ebbda7

+ 1 - 1
src/node-transformers/obfuscating-transformers/obfuscating-replacers/identifier-obfuscating-replacers/BaseIdentifierObfuscatingReplacer.ts

@@ -116,7 +116,7 @@ export class BaseIdentifierObfuscatingReplacer extends AbstractObfuscatingReplac
      * @returns {boolean}
      */
     private isReservedName (name: string): boolean {
-        if (!this.options.reservedStrings.length) {
+        if (!this.options.reservedNames || !this.options.reservedNames.length) {
             return false;
         }