Add fallback
This commit is contained in:
@@ -70,5 +70,9 @@ export function show(
|
||||
...options,
|
||||
duration: options?.duration ?? DURATION,
|
||||
})
|
||||
} else {
|
||||
throw new Error(
|
||||
`Toast can be a string or a React element, got ${typeof content}`,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,5 +49,9 @@ export function show(
|
||||
...options,
|
||||
duration: options?.duration ?? DURATION,
|
||||
})
|
||||
} else {
|
||||
throw new Error(
|
||||
`Toast can be a string or a React element, got ${typeof content}`,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user