aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/assets/javascript
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2014-05-22 01:27:23 +0800
committerrxu <rxu@mail.ru>2014-05-22 19:59:33 +0800
commit6466002052bafa47f01d470a9a85201406aead1c (patch)
treea9bff451863e59018e27242a6b5f7f7c749e446e /phpBB/assets/javascript
parenta2cd9c2464b2f83ec005831955d2f027c9c0210a (diff)
downloadforums-6466002052bafa47f01d470a9a85201406aead1c.tar
forums-6466002052bafa47f01d470a9a85201406aead1c.tar.gz
forums-6466002052bafa47f01d470a9a85201406aead1c.tar.bz2
forums-6466002052bafa47f01d470a9a85201406aead1c.tar.xz
forums-6466002052bafa47f01d470a9a85201406aead1c.zip
[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
Diffstat (limited to 'phpBB/assets/javascript')
-rw-r--r--phpBB/assets/javascript/core.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index cd633ed2ae..3cb41039cf 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -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() {
- alert.hide();
+ if (typeof alert !== 'undefined') {
+ alert.hide();
+ }
});
}, res.REFRESH_DATA.time * 1000); // Server specifies time in seconds
}