From 9bcff3cd7997fe13425a21b577f93317831f77fa Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Wed, 21 Aug 2024 09:08:16 -0300 Subject: [PATCH] fix(core): properly remove isolation script from DOM (#10703) --- .changes/fix-android-remove-current-script.md | 5 +++++ core/tauri-utils/src/pattern/isolation.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changes/fix-android-remove-current-script.md diff --git a/.changes/fix-android-remove-current-script.md b/.changes/fix-android-remove-current-script.md new file mode 100644 index 000000000..ddf70c521 --- /dev/null +++ b/.changes/fix-android-remove-current-script.md @@ -0,0 +1,5 @@ +--- +"tauri-utils": patch:bug +--- + +Properly remove isolation script on Android. diff --git a/core/tauri-utils/src/pattern/isolation.js b/core/tauri-utils/src/pattern/isolation.js index b0b1370b5..9a44611c6 100644 --- a/core/tauri-utils/src/pattern/isolation.js +++ b/core/tauri-utils/src/pattern/isolation.js @@ -149,6 +149,6 @@ } setTimeout(waitUntilReady, readyIntervalMs) - - document.currentScript.remove() })() + +document.currentScript?.remove()