Fix logging code in `trusted-replace-argument` scriptlet

Related feedback:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/859#discussioncomment-8368839
This commit is contained in:
Raymond Hill 2024-02-14 11:41:58 -05:00
parent e16cedb18d
commit ebb110fb3e
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -4650,7 +4650,7 @@ function trustedReplaceArgument(
const argBefore = arglist[argpos];
if ( reCondition.test(argBefore) === false ) { return reflector(...args); }
arglist[argpos] = normalValue;
safe.uboLog(logPrefix, `Replaced argument:\nBefore: ${argBefore.trim()}\nAfter: ${normalValue}`);
safe.uboLog(logPrefix, `Replaced argument:\nBefore: ${JSON.stringify(argBefore)}\nAfter: ${normalValue}`);
return reflector(...args);
});
}