Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.

Commit 0d0e8f2

Browse files
authored
Don't overload Vue with unnecessary props
1 parent 35916ed commit 0d0e8f2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/index.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,7 @@ export default {
4949
};
5050

5151
Vue.mixin({
52-
// Vue v1.x
53-
beforeCompile: addListeners,
54-
55-
// Vue v2.x
56-
beforeCreate: addListeners,
57-
58-
52+
[Vue.version.indexOf('2') === 0 ? 'beforeCreate' : 'beforeCompile']: addListeners,
5953
beforeDestroy: removeListeners
6054
});
6155

0 commit comments

Comments
 (0)