diff options
Diffstat (limited to 'src/ng')
| -rw-r--r-- | src/ng/log.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ng/log.js b/src/ng/log.js index c64e04f3..1d9a001a 100644 --- a/src/ng/log.js +++ b/src/ng/log.js @@ -139,9 +139,16 @@ function $LogProvider(){ function consoleLog(type) { var console = $window.console || {}, - logFn = console[type] || console.log || noop; + logFn = console[type] || console.log || noop, + hasApply = false; - if (logFn.apply) { + // Note: reading logFn.apply throws an error in IE11 in IE8 document mode. + // The reason behind this is that console.log has type "object" in IE8... + try { + hasApply = !! logFn.apply; + } catch (e) {} + + if (hasApply) { return function() { var args = []; forEach(arguments, function(arg) { |
