From fc3bbee74a2346ac95ff2d9b0cf1e5d7b943bbaf Mon Sep 17 00:00:00 2001 From: shinya Date: Wed, 20 Aug 2025 20:07:15 +0800 Subject: [PATCH] fix: init failed --- src/instrumentation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/instrumentation.ts b/src/instrumentation.ts index 96f4349..f730fa1 100644 --- a/src/instrumentation.ts +++ b/src/instrumentation.ts @@ -521,7 +521,7 @@ async function runCriticalStartupChecks(): Promise { */ export async function register() { // 只在服务器端运行 - if (typeof window === 'undefined') { + if (typeof window === 'undefined' && typeof process !== 'undefined' && process.on && typeof process.on === 'function') { console.log('🚀 MoonTV 启动检查开始...'); // 注册进程退出事件处理