Skip to content

Commit 448d811

Browse files
author
pvlg
authored
Not removed from index 0
$('#multiple-input').multipleInput('remove', 0); remove the last element
1 parent c339ee7 commit 448d811

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151

152152
remove: function (index) {
153153
var row = null;
154-
if (index) {
154+
if (index != undefined) {
155155
row = $(this).find('.js-input-remove:eq(' + index + ')');
156156
} else {
157157
row = $(this).find('.js-input-remove').last();
@@ -367,4 +367,4 @@
367367
String.prototype.replaceAll = function (search, replace) {
368368
return this.split(search).join(replace);
369369
};
370-
})(window.jQuery);
370+
})(window.jQuery);

0 commit comments

Comments
 (0)