From cce15c9506490549176358170750bcf2e930c998 Mon Sep 17 00:00:00 2001 From: Qing Date: Thu, 17 Nov 2022 21:50:39 +0800 Subject: [PATCH] fix gui keepGUIAlive --- lama_cleaner/app/src/utils.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lama_cleaner/app/src/utils.ts b/lama_cleaner/app/src/utils.ts index 7df2c88..e17ec06 100644 --- a/lama_cleaner/app/src/utils.ts +++ b/lama_cleaner/app/src/utils.ts @@ -177,13 +177,9 @@ export function keepGUIAlive() { }) } - if (!process.env.NODE_ENV || process.env.NODE_ENV === 'production') { - document.addEventListener('DOMContentLoaded', () => { - const intervalRequest = 3 * 1000 - keepAliveServer() - setInterval(keepAliveServer, intervalRequest) - }) - } + const intervalRequest = 3 * 1000 + keepAliveServer() + setInterval(keepAliveServer, intervalRequest) } export function isRightClick(ev: SyntheticEvent) {