Index: src/object-observe.js |
diff --git a/src/object-observe.js b/src/object-observe.js |
index ada7919d6dd215f6d49470f30dca230d14f02d83..90c9a699e0569281ca3d415f880e04c21423600e 100644 |
--- a/src/object-observe.js |
+++ b/src/object-observe.js |
@@ -216,8 +216,10 @@ function ObjectObserve(object, callback, accept) { |
} |
var objectInfo = objectInfoMap.get(object); |
- if (IS_UNDEFINED(objectInfo)) objectInfo = CreateObjectInfo(object); |
- %SetIsObserved(object, true); |
+ if (IS_UNDEFINED(objectInfo)) { |
+ objectInfo = CreateObjectInfo(object); |
+ %SetIsObserved(object); |
+ } |
EnsureObserverRemoved(objectInfo, callback); |
@@ -241,12 +243,6 @@ function ObjectUnobserve(object, callback) { |
return object; |
EnsureObserverRemoved(objectInfo, callback); |
- |
- if (objectInfo.changeObservers.length === 0 && |
- objectInfo.inactiveObservers.length === 0) { |
- %SetIsObserved(object, false); |
- } |
- |
return object; |
} |