Skip to content

Commit 4df54f6

Browse files
committed
fix api/child unit test in IE
1 parent 68b1a00 commit 4df54f6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/api/child.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ exports.$addChild = function (opts, BaseCtor) {
2626
}
2727
ChildVue = ctors[BaseCtor.cid]
2828
if (!ChildVue) {
29-
var className = BaseCtor.name || 'VueComponent'
29+
var optionName = BaseCtor.options.name
30+
var className = optionName
31+
? _.camelize(optionName, true)
32+
: 'VueComponent'
3033
ChildVue = new Function(
3134
'return function ' + className + ' (options) {' +
3235
'this.constructor = ' + className + ';' +

0 commit comments

Comments
 (0)