From e839e8f7541bd7720d4679a92e50765451f0c128 Mon Sep 17 00:00:00 2001 From: gxz Date: Tue, 12 Nov 2024 10:17:14 +0800 Subject: [PATCH] Revert "chore: optimize" This reverts commit 83f3e56b264714927fe82e0b8109b33e449948ee. --- ts/Decoder/gpu-utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/Decoder/gpu-utils.ts b/ts/Decoder/gpu-utils.ts index 438ca9d90..a973b65ef 100644 --- a/ts/Decoder/gpu-utils.ts +++ b/ts/Decoder/gpu-utils.ts @@ -25,7 +25,8 @@ export class GpuInfo { * @ignore */ export const getGpuInfoInternal = (callback: any): void => { - if (typeof window === 'undefined') { + //@ts-ignore + if (process.type !== 'browser') { console.error('getGpuInfoInternal should be called in main process'); return; }