Add fallback
This commit is contained in:
@@ -70,5 +70,9 @@ export function show(
|
|||||||
...options,
|
...options,
|
||||||
duration: options?.duration ?? DURATION,
|
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,
|
...options,
|
||||||
duration: options?.duration ?? DURATION,
|
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