From 083946fe409215d97bb6d712015e01081e5d3496 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 3c786b3379..019be2ccfe 100644 --- a/packages/nuxt/src/app/composables/error.ts +++ b/packages/nuxt/src/app/composables/error.ts @@ -56,7 +56,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 */