Skip to content

Commit 99f011b

Browse files
committed
Define unlink functions in init
... so that we don't accidentally fallback to parent's unlink fns when an instance with `inherti:true` is destroyed. Fixes vuejs#791.
1 parent 5d9126f commit 99f011b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/instance/init.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ exports._init = function (options) {
4848
// children
4949
this._children = []
5050
this._childCtors = {}
51-
// transcluded components that belong to the parent
51+
52+
// transclusion unlink functions
53+
this._containerUnlinkFn =
54+
this._contentUnlinkFn = null
55+
56+
// transcluded components that belong to the parent.
57+
// need to keep track of them so that we can call
58+
// attached/detached hooks on them.
5259
this._transCpnts = null
5360

5461
// merge options.

0 commit comments

Comments
 (0)