Commit b05f39cd authored by Jonny Bradley's avatar Jonny Bradley

[FIX] tikiModal: Inconsistent return values - always return the object if possible.

parent 94b5834d
......@@ -2627,7 +2627,7 @@ $.tikiModal = function(msg) {
$.fn.tikiModal = function(msg) {
var obj = $(this);
if (!obj.length) {
return; // happens after search index rebuild in some conditions
return null; // happens after search index rebuild in some conditions
}
var lastModal = obj.data('lastModal');
......@@ -2652,7 +2652,7 @@ $.fn.tikiModal = function(msg) {
$(this).remove();
});
obj.removeData('lastModal');
return;
return obj;
}
if (modal.length) {
......@@ -2661,7 +2661,7 @@ $.fn.tikiModal = function(msg) {
.empty()
.html(spinner)
.append(msg);
return;
return obj;
}
modal = $('<div id="modal_' + lastModal + '" class="tiki-modal">' +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment