diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-01-02 12:21:30 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-01-02 12:21:30 +0100 |
commit | 5b07e722cbee3582fd461c83f5978001d94da7f8 (patch) | |
tree | d48c444e0f5f4651fc0914e9cde6c0a3eb0dc499 /core | |
parent | ed060707414bee50d7360c6eda05a4da475295af (diff) | |
download | nextcloud-server-5b07e722cbee3582fd461c83f5978001d94da7f8.tar.gz nextcloud-server-5b07e722cbee3582fd461c83f5978001d94da7f8.zip |
combine ie8 fix with debug check
Diffstat (limited to 'core')
-rw-r--r-- | core/js/js.js | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/core/js/js.js b/core/js/js.js index 503684b8747..610950995db 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -3,30 +3,24 @@ * Add * define('DEBUG', true); * To the end of config/config.php to enable debug mode. + * The undefined checks fix the broken ie8 console */ -if (oc_debug !== true) { +if (oc_debug !== true || typeof console === "undefined" || typeof console.log === "undefined") { if (!window.console) { window.console = {}; } var methods = ['log', 'debug', 'warn', 'info', 'error', 'assert']; for (var i = 0; i < methods.length; i++) { - console[methods[i]] = function () { }; + console[methods[i]] = function () { }; } } -/** - * fix broken console log in ie8 - */ -if (typeof console === "undefined" || typeof console.log === "undefined") { - console = {}; - console.log = function() {}; -} + /** * translate a string * @param app the id of the app for which to translate the string * @param text the string to translate * @return string */ - function t(app,text, vars){ if( !( t.cache[app] )){ $.ajax(OC.filePath('core','ajax','translations.php'),{ |