Skip to content

Commit 69b9f0f

Browse files
committed
fix #695 name option should be inherited for constructor name
1 parent c9b425d commit 69b9f0f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/api/global.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ var cid = 1
4040
exports.extend = function (extendOptions) {
4141
extendOptions = extendOptions || {}
4242
var Super = this
43-
var Sub = createClass(extendOptions.name || 'VueComponent')
43+
var Sub = createClass(
44+
extendOptions.name ||
45+
Super.options.name ||
46+
'VueComponent'
47+
)
4448
Sub.prototype = Object.create(Super.prototype)
4549
Sub.prototype.constructor = Sub
4650
Sub.cid = cid++

0 commit comments

Comments
 (0)