File tree Expand file tree Collapse file tree 1 file changed +4
-20
lines changed
Expand file tree Collapse file tree 1 file changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -18,30 +18,14 @@ module.exports = {
1818 var childKey = prop . path
1919 var parentKey = prop . parentPath
2020
21- // simple lock to avoid circular updates.
22- // without this it would stabilize too, but this makes
23- // sure it doesn't cause other watchers to re-evaluate.
24- var locked = false
25- function withLock ( fn ) {
26- return function ( val ) {
27- if ( ! locked ) {
28- locked = true
29- fn ( val )
30- _ . nextTick ( function ( ) {
31- locked = false
32- } )
33- }
34- }
35- }
36-
3721 this . parentWatcher = new Watcher (
3822 parent ,
3923 parentKey ,
40- withLock ( function ( val ) {
24+ function ( val ) {
4125 if ( _ . assertProp ( prop , val ) ) {
4226 child [ childKey ] = val
4327 }
44- } )
28+ }
4529 )
4630
4731 // set the child initial value.
@@ -64,9 +48,9 @@ module.exports = {
6448 self . childWatcher = new Watcher (
6549 child ,
6650 childKey ,
67- withLock ( function ( val ) {
51+ function ( val ) {
6852 parent . $set ( parentKey , val )
69- } )
53+ }
7054 )
7155 } )
7256 }
You can’t perform that action at this time.
0 commit comments