From b2a45e91a39fcc74ca4b44d48df5e7b74f35ad32 Mon Sep 17 00:00:00 2001 From: Gabe Mahan Date: Tue, 5 Dec 2023 10:15:53 -0800 Subject: [PATCH] more sensible optional chaining on debug calls --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 6e6f1f7..d2a06b7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -40,11 +40,11 @@ export function obfuscator(options: RollupObfuscatorOptions = {}): ObfuscatorPlu transform(code, id) { if (!filter(id)) { - this?.debug(`[rollup-obfuscator] Ignoring "${id}"`); + this.debug?.(`[rollup-obfuscator] Ignoring "${id}"`); return null; } - this?.debug(`[rollup-obfuscator] Obfuscating "${id}"`); + this.debug?.(`[rollup-obfuscator] Obfuscating "${id}"`); const result = Obfuscator.obfuscate(code, { stringArray: false,