فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
fix(test): correctly report custom tauri://localhost origin without null serialization
davoodmehraban89 committed
Oct 16, 2026 at 19:11 UTC
4ff4a18d0f1954a45b102423b09a46cb1038be41
1 file changed
+3
-1
tests/windows-vm-native-origin.cjs
+3
-1
@@ -12,6 +12,8 @@ function verifyNativeOrigin(href) {
12
if (!tauriHttp && !tauriScheme) {
13
throw Error('Installed WebView2 unexpectedly loaded a non-Tauri application origin');
14
}
15
- return url.origin;
15
+ // URL.origin is "null" for custom schemes in JavaScript; preserve Tauri's
16
+ // validated local custom origin explicitly rather than reporting "null".
17
+ return tauriScheme ? 'tauri://localhost' : url.origin;
18
}
19
module.exports = { verifyNativeOrigin };