fix: window.open error caused by specs undefined

This commit is contained in:
Tianj0o
2024-07-15 19:52:19 +08:00
parent 1544b15ea6
commit ecfe2bf280

View File

@@ -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;