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 = {
18
18
var childKey = prop . path
19
19
var parentKey = prop . parentPath
20
20
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
-
37
21
this . parentWatcher = new Watcher (
38
22
parent ,
39
23
parentKey ,
40
- withLock ( function ( val ) {
24
+ function ( val ) {
41
25
if ( _ . assertProp ( prop , val ) ) {
42
26
child [ childKey ] = val
43
27
}
44
- } )
28
+ }
45
29
)
46
30
47
31
// set the child initial value.
@@ -64,9 +48,9 @@ module.exports = {
64
48
self . childWatcher = new Watcher (
65
49
child ,
66
50
childKey ,
67
- withLock ( function ( val ) {
51
+ function ( val ) {
68
52
parent . $set ( parentKey , val )
69
- } )
53
+ }
70
54
)
71
55
} )
72
56
}
You can’t perform that action at this time.
0 commit comments