Skip to content

Commit f11552b

Browse files
committed
remove unobservable object warning
1 parent 1d43566 commit f11552b

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

src/observer/index.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@ Observer.create = function (value, vm) {
5757
!value._isVue
5858
) {
5959
ob = new Observer(value)
60-
} else if (process.env.NODE_ENV !== 'production') {
61-
if (_.isObject(value) && !_.isArray(value) && !_.isPlainObject(value)) {
62-
_.warn(
63-
'Unobservable object found in data: ' +
64-
Object.prototype.toString.call(value)
65-
)
66-
}
6760
}
6861
if (ob && vm) {
6962
ob.addVm(vm)

test/unit/specs/observer/observer_spec.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,4 @@ describe('Observer', function () {
196196
expect(dep2.notify).toHaveBeenCalled()
197197
config.proto = true
198198
})
199-
200-
it('warn unobservable object', function () {
201-
Observer.create(window)
202-
expect(hasWarned(_, 'Unobservable object found in data')).toBe(true)
203-
})
204-
205199
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy