Skip to content

Commit

Permalink
Merge pull request #2019 from FroggyFlox/patch-1
Browse files Browse the repository at this point in the history
Skip empty label fields. Fixes #2019
  • Loading branch information
phillxnet committed Feb 24, 2019
2 parents c0750c3 + 55412a3 commit 8384681
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,9 @@ RockonAddLabel = RockstorWizardPage.extend({
return $.Deferred().reject();
}
var field_data = $('input[name^=labels]').map(function(idx, elem) {
return $(elem).val();
if ($(elem).val() != "") {
return $(elem).val();
}
}).get();
var new_labels = {};
field_data.forEach(function(prop) {
Expand Down

0 comments on commit 8384681

Please sign in to comment.