[ticket/12572] Fix JS error when alert message title is undefined

JS console reports error in core.js:
TypeError: alert is undefined
alert.hide()
when res.MESSAGE_TITLE is undefined.

PHPBB3-12572
This commit is contained in:
rxu 2014-05-22 01:27:23 +08:00
parent a2cd9c2464
commit 6466002052

View file

@ -333,7 +333,9 @@ phpbb.ajaxify = function(options) {
// Hide the alert even if we refresh the page, in case the user
// presses the back button.
dark.fadeOut(phpbb.alertTime, function() {
if (typeof alert !== 'undefined') {
alert.hide();
}
});
}, res.REFRESH_DATA.time * 1000); // Server specifies time in seconds
}