From 2e84970a98d923185d7a640fe48053be855eadab Mon Sep 17 00:00:00 2001 From: FLY123 <50164284+akfakf0509@users.noreply.github.com> Date: Tue, 8 Jul 2025 16:04:05 +0900 Subject: [PATCH 1/2] fix(dev): `process.title` could potentially be `undefined` --- packages/nuxi/src/dev/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxi/src/dev/index.ts b/packages/nuxi/src/dev/index.ts index 116d24277..c56c2555c 100644 --- a/packages/nuxi/src/dev/index.ts +++ b/packages/nuxi/src/dev/index.ts @@ -19,7 +19,7 @@ interface InitializeOptions { // IPC Hooks class IPC { - enabled = !!process.send && !process.title.includes('vitest') && process.env.__NUXT__FORK + enabled = !!process.send && (!!process.title && !process.title.includes('vitest')) && process.env.__NUXT__FORK constructor() { process.once('unhandledRejection', (reason) => { this.send({ type: 'nuxt:internal:dev:rejection', message: reason instanceof Error ? reason.toString() : 'Unhandled Rejection' }) From 52dfe841e932e75f33b7c0a6ae94c131a3b81b55 Mon Sep 17 00:00:00 2001 From: FLY123 <50164284+akfakf0509@users.noreply.github.com> Date: Tue, 8 Jul 2025 17:10:23 +0900 Subject: [PATCH 2/2] refactor(dev): simplified the logic that checks `process.title` --- packages/nuxi/src/dev/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxi/src/dev/index.ts b/packages/nuxi/src/dev/index.ts index c56c2555c..1152b1b38 100644 --- a/packages/nuxi/src/dev/index.ts +++ b/packages/nuxi/src/dev/index.ts @@ -19,7 +19,7 @@ interface InitializeOptions { // IPC Hooks class IPC { - enabled = !!process.send && (!!process.title && !process.title.includes('vitest')) && process.env.__NUXT__FORK + enabled = !!process.send && !process.title?.includes('vitest') && process.env.__NUXT__FORK constructor() { process.once('unhandledRejection', (reason) => { this.send({ type: 'nuxt:internal:dev:rejection', message: reason instanceof Error ? reason.toString() : 'Unhandled Rejection' })