feat(suspense): replace errors with warnings (#412)

This commit is contained in:
Dmitry Sharshakov 2019-10-30 18:37:05 +03:00 committed by Evan You
parent cb97d152b8
commit d3d2353eac

View File

@ -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)