mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(nuxt): improve isNuxtError
type inference (#28814)
This commit is contained in:
parent
9f64e8cb5d
commit
083946fe40
@ -56,7 +56,7 @@ export const clearError = async (options: { redirect?: string } = {}) => {
|
||||
|
||||
/** @since 3.0.0 */
|
||||
export const isNuxtError = <DataT = unknown>(
|
||||
error?: string | object,
|
||||
error: unknown,
|
||||
): error is NuxtError<DataT> => !!error && typeof error === 'object' && NUXT_ERROR_SIGNATURE in error
|
||||
|
||||
/** @since 3.0.0 */
|
||||
|
Loading…
Reference in New Issue
Block a user