]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
feat(suspense): replace errors with warnings (#412)
authorDmitry Sharshakov <d3dx12.xx@gmail.com>
Wed, 30 Oct 2019 15:37:05 +0000 (18:37 +0300)
committerEvan You <yyx990803@gmail.com>
Wed, 30 Oct 2019 15:37:05 +0000 (11:37 -0400)
packages/runtime-core/src/createRenderer.ts

index 4151b3d7e8c2d0b3c47d96712e43c84f63e6ac4f..e49728e862cc426698cd4e2ef1c27bfd0bcf1927 100644 (file)
@@ -848,8 +848,8 @@ export function createRenderer<
     // before proceeding
     if (__FEATURE_SUSPENSE__ && instance.asyncDep) {
       if (!parentSuspense) {
-        // TODO handle this properly
-        throw new Error('Async setup() is used without a suspense boundary!')
+        if (__DEV__) warn('async setup() is used without a suspense boundary!')
+        return
       }
 
       parentSuspense.registerDep(instance, setupRenderEffect)