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 4d22363 commit 2248960Copy full SHA for 2248960
src/compiler.js
@@ -312,7 +312,7 @@ CompilerProto.observeData = function (data) {
312
compiler.data = newData
313
Observer.copyPaths(newData, oldData)
314
Observer.observe(newData, '', observer)
315
- compiler.observer.emit('set', '$data', newData)
+ update()
316
}
317
})
318
@@ -322,9 +322,12 @@ CompilerProto.observeData = function (data) {
322
.on('mutate', onSet)
323
324
function onSet (key) {
325
- if (key !== '$data') {
326
- $dataBinding.update(compiler.data)
327
- }
+ if (key !== '$data') update()
+ }
+
328
+ function update () {
329
+ $dataBinding.update(compiler.data)
330
+ observer.emit('change:$data', compiler.data)
331
332
333
0 commit comments