Fix: catch csp error
This commit is contained in:
parent
e0b064115d
commit
fa080d1913
|
@ -110,8 +110,12 @@ const APPLY = (() => {
|
|||
}
|
||||
};
|
||||
window.addEventListener(EVENT_NAME, check, true);
|
||||
try {
|
||||
// eslint-disable-next-line no-eval
|
||||
window.eval(`(${scriptContent})(${JSON.stringify(EVENT_NAME)})`);
|
||||
} catch (err) {
|
||||
// csp error
|
||||
}
|
||||
window.removeEventListener(EVENT_NAME, check, true);
|
||||
return ok;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user