From 56a6d57a60fb4fc39bf027739f3c9e98d62eef57 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Tue, 30 Apr 2024 13:19:58 +0900 Subject: [PATCH] Add Capacitor import for preLoadCheck function in preload.ts --- src/preload.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/preload.ts b/src/preload.ts index ecfef40e..6564f23c 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -1,3 +1,4 @@ +import { Capacitor } from "@capacitor/core"; export function preLoadCheck(){ const searchParams = new URLSearchParams(location.search); @@ -6,8 +7,9 @@ export function preLoadCheck(){ const isTauri = !!window.__TAURI__ //@ts-ignore const isNodeServer = !!globalThis.__NODE__ - - const isWeb = !isTauri && !isNodeServer && location.hostname !== 'risuai.xyz'; + const isCapacitor = Capacitor.isNativePlatform(); + + const isWeb = !isTauri && !isNodeServer && location.hostname !== 'risuai.xyz' && !isCapacitor; // Check if the user has visited the main page