Przeglądaj źródła

fix: avoid isPromise check when handler return value is Vue instance

fix #9418
Evan You 7 lat temu
rodzic
commit
b6b42ca8c4
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/core/util/error.js

+ 1 - 1
src/core/util/error.js

@@ -35,7 +35,7 @@ export function invokeWithErrorHandling (
   let res
   try {
     res = args ? handler.apply(context, args) : handler.call(context)
-    if (isPromise(res)) {
+    if (res && !res._isVue && isPromise(res)) {
       res.catch(e => handleError(e, vm, info + ` (Promise/async)`))
     }
   } catch (e) {