From ecfe2bf2800b81e55663eb7efdca3616f31e49c7 Mon Sep 17 00:00:00 2001 From: Tianj0o <2576099053@qq.com> Date: Mon, 15 Jul 2024 19:52:19 +0800 Subject: [PATCH] fix: window.open error caused by specs undefined --- src-tauri/src/inject/event.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/inject/event.js b/src-tauri/src/inject/event.js index 3221ba2..636b3d4 100644 --- a/src-tauri/src/inject/event.js +++ b/src-tauri/src/inject/event.js @@ -236,7 +236,7 @@ document.addEventListener('DOMContentLoaded', () => { // Apple login and google login if (name === 'AppleAuthentication') { //do nothing - } else if (specs.includes('height=') || specs.includes('width=')) { + } else if (specs && (specs.includes('height=') || specs.includes('width='))) { location.href = url; } else { const baseUrl = window.location.origin + window.location.pathname;