Просмотр исходного кода

chore: remove stale _isVue checks

Evan You 6 лет назад
Родитель
Сommit
352c369704
2 измененных файлов с 1 добавлено и 2 удалено
  1. 0 1
      packages/reactivity/src/reactive.ts
  2. 1 1
      packages/runtime-core/src/errorHandling.ts

+ 0 - 1
packages/reactivity/src/reactive.ts

@@ -29,7 +29,6 @@ const isObservableType = /*#__PURE__*/ makeMap(
 
 const canObserve = (value: any): boolean => {
   return (
-    !value._isVue &&
     !value._isVNode &&
     isObservableType(toRawType(value)) &&
     !rawValues.has(value) &&

+ 1 - 1
packages/runtime-core/src/errorHandling.ts

@@ -81,7 +81,7 @@ export function callWithAsyncErrorHandling(
 ): any[] {
   if (isFunction(fn)) {
     const res = callWithErrorHandling(fn, instance, type, args)
-    if (res && !res._isVue && isPromise(res)) {
+    if (res && isPromise(res)) {
       res.catch(err => {
         handleError(err, instance, type)
       })