summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/scripts/script.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/scripts/script.js b/lib/scripts/script.js
index fc8cb6096..24473c2e6 100644
--- a/lib/scripts/script.js
+++ b/lib/scripts/script.js
@@ -14,10 +14,12 @@ if ('function' === typeof jQuery && 'function' === typeof jQuery.noConflict) {
*/
function DEPRECATED(msg){
if(!window.console) return;
- if(!arguments.callee) return;
+ if(!msg) msg = '';
- var func = arguments.callee.caller.name;
- var line = 'DEPRECATED function call '+func+'(). '+msg;
+ var func;
+ if(arguments.callee) func = arguments.callee.caller.name;
+ if(func) func = ' '+func+'()';
+ var line = 'DEPRECATED function call'+func+'. '+msg;
if(console.warn){
console.warn(line);