Skip to content

Commit 8f02e28

Browse files
committed
Prevent errors when call widget without options
1 parent 8c880a8 commit 8f02e28

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/assets/src/js/jquery.multipleInput.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@
6565

6666
var methods = {
6767
init: function (options) {
68+
if (typeof options !== 'object') {
69+
console.error('Options must be an object');
70+
return;
71+
}
72+
6873
var settings = $.extend(true, {}, defaultOptions, options || {}),
6974
$wrapper = $('#' + settings.id),
7075
form = $wrapper.closest('form'),

src/assets/src/js/jquery.multipleInput.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)