Explorar el Código

use isExtensible instead of isFrozen for a safer check (fix #1995)

Evan You hace 10 años
padre
commit
4c6890432e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/observer/index.js

+ 1 - 1
src/observer/index.js

@@ -157,7 +157,7 @@ export function observe (value, vm) {
     ob = value.__ob__
   } else if (
     (isArray(value) || isPlainObject(value)) &&
-    !Object.isFrozen(value) &&
+    Object.isExtensible(value) &&
     !value._isVue
   ) {
     ob = new Observer(value)