We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9136b1 commit 54f5f9bCopy full SHA for 54f5f9b
src/core/instance/state.ts
@@ -60,7 +60,8 @@ export function initState(vm: Component) {
60
if (opts.data) {
61
initData(vm)
62
} else {
63
- observe((vm._data = {}))!.vmCount++
+ const ob = observe((vm._data = {}))
64
+ ob && ob.vmCount++
65
}
66
if (opts.computed) initComputed(vm, opts.computed)
67
if (opts.watch && opts.watch !== nativeWatch) {
@@ -154,7 +155,8 @@ function initData(vm: Component) {
154
155
156
157
// observe data
- observe(data)!.vmCount++
158
+ const ob = observe(data)
159
160
161
162
export function getData(data: Function, vm: Component): any {
0 commit comments