Skip to content

Commit ac62119

Browse files
committedNov 29, 2019
fix(#189): IE issue
1 parent 5fa9e98 commit ac62119

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎src/utils/createVueInstance.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ export default function createVueInstance(element, Vue, componentDefinition, pro
2727
ComponentDefinition.beforeCreate = [].concat(ComponentDefinition.beforeCreate || [], beforeCreate);
2828

2929
if (ComponentDefinition._compiled) { // eslint-disable-line no-underscore-dangle
30-
let ctorOptions = {}; // adjust vue-loader cache object if necessary - https://github.com/vuejs/vue-loader/issues/83
31-
if (ComponentDefinition._Ctor) { // eslint-disable-line no-underscore-dangle
32-
ctorOptions = Object.values(ComponentDefinition._Ctor)[0].options; // eslint-disable-line no-underscore-dangle
30+
let constructorOptions = {}; // adjust vue-loader cache object if necessary - https://github.com/vuejs/vue-loader/issues/83
31+
const constructor = ComponentDefinition._Ctor; // eslint-disable-line no-underscore-dangle
32+
if (constructor) { // eslint-disable-line no-underscore-dangle
33+
constructorOptions = Object.keys(constructor).map(key => constructor[key])[0].options; // eslint-disable-line no-underscore-dangle
3334
}
34-
ctorOptions.beforeCreate = ComponentDefinition.beforeCreate;
35+
constructorOptions.beforeCreate = ComponentDefinition.beforeCreate;
3536
}
3637

3738
let rootElement;

0 commit comments

Comments
 (0)
Please sign in to comment.