feat(suspense): replace errors with warnings (#412)
This commit is contained in:
parent
cb97d152b8
commit
d3d2353eac
@ -848,8 +848,8 @@ export function createRenderer<
|
|||||||
// before proceeding
|
// before proceeding
|
||||||
if (__FEATURE_SUSPENSE__ && instance.asyncDep) {
|
if (__FEATURE_SUSPENSE__ && instance.asyncDep) {
|
||||||
if (!parentSuspense) {
|
if (!parentSuspense) {
|
||||||
// TODO handle this properly
|
if (__DEV__) warn('async setup() is used without a suspense boundary!')
|
||||||
throw new Error('Async setup() is used without a suspense boundary!')
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
parentSuspense.registerDep(instance, setupRenderEffect)
|
parentSuspense.registerDep(instance, setupRenderEffect)
|
||||||
|
Loading…
Reference in New Issue
Block a user