File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -29,17 +29,14 @@ module.exports = {
29
29
)
30
30
31
31
// set the child initial value.
32
- // !!! We need to set it also on raw data here, because
33
- // props are initialized before data is fully observed
34
32
var value = this . parentWatcher . value
35
33
if ( childKey === '$data' ) {
36
34
child . _data = value
37
35
} else {
38
36
_ . initProp ( child , prop , value )
39
37
}
40
38
41
- // only setup two-way binding if this is not a one-way
42
- // binding.
39
+ // setup two-way binding
43
40
if ( prop . mode === bindingModes . TWO_WAY ) {
44
41
// important: defer the child watcher creation until
45
42
// the created hook (after data observation)
@@ -57,9 +54,7 @@ module.exports = {
57
54
} ,
58
55
59
56
unbind : function ( ) {
60
- if ( this . parentWatcher ) {
61
- this . parentWatcher . teardown ( )
62
- }
57
+ this . parentWatcher . teardown ( )
63
58
if ( this . childWatcher ) {
64
59
this . childWatcher . teardown ( )
65
60
}
You can’t perform that action at this time.
0 commit comments