fix(core): update

This commit is contained in:
Philipp Kunz 2020-10-20 23:07:14 +00:00
parent c6b75f9236
commit a50e4df4ed

View File

@ -63,7 +63,7 @@ export class CsWebclient {
if (consentTuple.level === 'functional' || acceptedCookieLevels.includes(consentTuple.level)) { if (consentTuple.level === 'functional' || acceptedCookieLevels.includes(consentTuple.level)) {
const scriptString = consentTuple.script as string; const scriptString = consentTuple.script as string;
// tslint:disable-next-line: function-constructor // tslint:disable-next-line: function-constructor
const tupleFunction = new Function(scriptString); const tupleFunction = new Function(`return ${scriptString}`);
await tupleFunction(consentTuple.scriptExecutionDataArg); await tupleFunction(consentTuple.scriptExecutionDataArg);
console.log (`Successfully executed ConsentTuple >>${consentTuple.name}<< -> ${consentTuple.description}`); console.log (`Successfully executed ConsentTuple >>${consentTuple.name}<< -> ${consentTuple.description}`);
} }