Skip to content

Commit ad6a260

Browse files
committed
fix class extending
1 parent 8ddbfb9 commit ad6a260

File tree

4 files changed

+26
-19605
lines changed

4 files changed

+26
-19605
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
example/build.js
33
example/build.js.map
4+
test/test.build.js

index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ function componentFactory (Component, options) {
4444
}
4545
})
4646
// find super
47-
var Super = proto.__proto__.constructor
48-
if (!(Super instanceof Vue)) {
49-
Super = Vue
50-
}
47+
var Super
48+
var superProto = Object.getPrototypeOf(Component.prototype)
49+
var Super = superProto instanceof Vue
50+
? superProto.constructor
51+
: Vue
5152
return Super.extend(options)
5253
}
5354

0 commit comments

Comments
 (0)