@@ -39,22 +39,19 @@ module.exports = {
3939 // avoid duplicate compiles, since update() can be
4040 // called with different truthy values
4141 if ( ! this . unlink ) {
42- var frag = templateParser . clone ( this . template )
43- this . compile ( frag )
42+ this . compile ( )
4443 }
4544 } else {
4645 this . teardown ( )
4746 }
4847 } ,
4948
50- // NOTE: this function is shared in v-partial
51- compile : function ( frag ) {
49+ compile : function ( ) {
5250 var vm = this . vm
51+ var frag = templateParser . clone ( this . template )
5352 // the linker is not guaranteed to be present because
5453 // this function might get called by v-partial
55- this . unlink = this . linker
56- ? this . linker ( vm , frag )
57- : vm . $compile ( frag )
54+ this . unlink = this . linker ( vm , frag )
5855 transition . blockAppend ( frag , this . end , vm )
5956 // call attached for all the child components created
6057 // during the compilation
@@ -64,7 +61,6 @@ module.exports = {
6461 }
6562 } ,
6663
67- // NOTE: this function is shared in v-partial
6864 teardown : function ( ) {
6965 if ( ! this . unlink ) return
7066 // collect children beforehand
@@ -78,7 +74,6 @@ module.exports = {
7874 this . unlink = null
7975 } ,
8076
81- // NOTE: this function is shared in v-partial
8277 getContainedComponents : function ( ) {
8378 var vm = this . vm
8479 var start = this . start . nextSibling
@@ -110,7 +105,6 @@ module.exports = {
110105 : transComponents
111106 } ,
112107
113- // NOTE: this function is shared in v-partial
114108 unbind : function ( ) {
115109 if ( this . unlink ) this . unlink ( )
116110 }
0 commit comments