mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 21:06:07 +02:00
Merge pull request #5380 from pitaj/master
Fix wrapper breaking when no attrs need replaced
This commit is contained in:
16
public/vendor/bootbox/wrapper.js
vendored
16
public/vendor/bootbox/wrapper.js
vendored
@@ -52,12 +52,16 @@ require(['translator'], function (shim) {
|
||||
]).then(function (ref) {
|
||||
var translated = ref[0];
|
||||
var translatedAttrs = ref[1];
|
||||
translated.split(' || ').forEach(function (html, i) {
|
||||
$(nodes[i]).replaceWith(html);
|
||||
});
|
||||
translatedAttrs.split(' || ').forEach(function (text, i) {
|
||||
attrNodes[i][1].setAttribute(attrNodes[i][0], text);
|
||||
});
|
||||
if (translated) {
|
||||
translated.split(' || ').forEach(function (html, i) {
|
||||
$(nodes[i]).replaceWith(html);
|
||||
});
|
||||
}
|
||||
if (translatedAttrs) {
|
||||
translatedAttrs.split(' || ').forEach(function (text, i) {
|
||||
attrNodes[i][1].setAttribute(attrNodes[i][0], text);
|
||||
});
|
||||
}
|
||||
if (show) {
|
||||
$elem.modal('show');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user