From 0c9aa08858647b445d85f7caca84acbbaa8df8ac Mon Sep 17 00:00:00 2001 From: Gianluca Di Francesco Date: Tue, 3 Sep 2024 23:43:49 +0200 Subject: [PATCH] fix(nuxt): improve `isNuxtError` type inference (#28814) --- packages/nuxt/src/app/composables/error.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/app/composables/error.ts b/packages/nuxt/src/app/composables/error.ts index c172007f04..8c5885e52d 100644 --- a/packages/nuxt/src/app/composables/error.ts +++ b/packages/nuxt/src/app/composables/error.ts @@ -53,7 +53,7 @@ export const clearError = async (options: { redirect?: string } = {}) => { /** @since 3.0.0 */ export const isNuxtError = ( - error?: string | object, + error: unknown, ): error is NuxtError => !!error && typeof error === 'object' && NUXT_ERROR_SIGNATURE in error /** @since 3.0.0 */