Skip to content

Commit 445aab8

Browse files
authored
Add not found error
Component throw error if vue.js or sortable.js not loaded!
1 parent f8bf03e commit 445aab8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

dist/vuedraggable.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,5 +369,13 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
369369
} else if (window && window.Vue && window.Sortable) {
370370
var draggable = buildDraggable(window.Sortable);
371371
Vue.component('draggable', draggable);
372+
} else {
373+
if(typeof window.Vue == "undefined") {
374+
console.error('Vue.js not found!');
375+
}
376+
377+
if(typeof window.Sortable == "undefined") {
378+
console.error('Sortable.js not found!');
379+
}
372380
}
373-
})();
381+
})();

0 commit comments

Comments
 (0)