Skip to content

Commit

Permalink
fixes iframes in windows causes window.__TAURI_INVOKE__ is not a func…
Browse files Browse the repository at this point in the history
…tion error in console. (#10989)

* fix #10935

Check if window has __TAURI_INVOKE__ before using it blindly.

* Update core/tauri/scripts/init.js

---------

Co-authored-by: Lucas Fernandes Nogueira <[email protected]>
  • Loading branch information
hmic and lucasfernog authored Sep 14, 2024
1 parent 298f8ca commit 8a0e93b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/tauri/scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@

__RAW_event_initialization_script__

window.__TAURI_INVOKE__('__initialized', { url: window.location.href })
if (window.__TAURI_INVOKE__ !== undefined) window.__TAURI_INVOKE__('__initialized', { url: window.location.href })
})()

0 comments on commit 8a0e93b

Please sign in to comment.