Skip to content

Commit

Permalink
Warn when incompatible version of Vue is used
Browse files Browse the repository at this point in the history
  • Loading branch information
simplesmiler committed Sep 28, 2016
1 parent dee6382 commit 2c13a93
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
import Vue from 'vue';

export var version = '2.0.0-rc1';

var compatible = (/^2\./).test(Vue.version);
if (!compatible) {
Vue.util.warn('VueFocus ' + version + ' only supports Vue 2.x, and does not support Vue ' + Vue.version);
}

export var focus = {
inserted: function(el, binding) {
if (binding.value) el.focus();
Expand Down

0 comments on commit 2c13a93

Please sign in to comment.