From 37f21ef8d549a881fd0e428dd86f4b00b6f8beac Mon Sep 17 00:00:00 2001 From: acuciureanu Date: Sat, 17 Feb 2024 10:16:43 +0200 Subject: [PATCH] fix(check script): updated check script to handle user-defined func names that include special chars --- sandbox/js/check.payload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sandbox/js/check.payload.js b/sandbox/js/check.payload.js index 465928c..3a6eb75 100644 --- a/sandbox/js/check.payload.js +++ b/sandbox/js/check.payload.js @@ -27,7 +27,7 @@ const probe = () => { } prototypePropertyNames.get(type.name).forEach((prop) => { - findings.push(`${type.name}.prototype.${prop}`); + findings.push(`${type.name}.prototype${/[^\w]/.test(prop) ? `['${prop}']` : `.${prop}`}`); }); }); return findings;