Skip to content

Commit 3cc9fee

Browse files
author
Eugene Tupikov
committed
Merge remote-tracking branch 'origin/master'
2 parents f0b1569 + 7c76627 commit 3cc9fee

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,8 @@
418418
} else {
419419
// fallback in case of using flatten widget - just remove all digital indexes
420420
// and check whether attribute exists or not.
421-
bareId = replaceAll(/-\d-/, '-').replaceAll(/-\d/, '', bareId);
421+
bareId = replaceAll(/-\d-/, '-', bareId);
422+
bareId = replaceAll(/-\d/, '', bareId);
422423
if (data.settings.attributes.hasOwnProperty(bareId)) {
423424
attributeOptions = data.settings.attributes[bareId];
424425
}
@@ -484,7 +485,7 @@
484485
};
485486

486487
var replaceAll = function (search, replace, subject) {
487-
if (!subject instanceof String) {
488+
if (!(subject instanceof String) && typeof subject !== 'string')) {
488489
console.warn('Call replaceAll for non-string value: ' + subject);
489490
return subject;
490491
}

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)