Browse Source

fix: error when using JS preload script

Ahmad Kholid 2 years ago
parent
commit
0a18bf5c97
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/newtab/utils/javascriptBlockUtil.js

+ 1 - 1
src/newtab/utils/javascriptBlockUtil.js

@@ -103,7 +103,7 @@ export function jsContentHandler($blockData, $preloadScripts, $automaScript) {
         function cleanUp() {
           script.remove();
           preloadScriptsEl.forEach((item) => {
-            if (item.removeAfterExec) item.script.remove();
+            if (item.removeAfterExec) item.element.remove();
           });
 
           clearTimeout(timeout);