diff --git a/lib/src/script.ts b/lib/src/script.ts index 4e75055..f1cc955 100644 --- a/lib/src/script.ts +++ b/lib/src/script.ts @@ -34,7 +34,7 @@ export function fetchScript({ const onComplete = (event, callback) => { try { - if (cleanup) { + if (!secureApi && cleanup) { element.removeChild(script); } callback(event);