| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | // Avoid `console` errors in browsers that lack a console. |
||
| 2 | (function() { |
||
| 3 | var method; |
||
| 4 | var noop = function () {}; |
||
| 5 | var methods = [ |
||
| 6 | 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', |
||
| 7 | 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', |
||
| 8 | 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', |
||
| 9 | 'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn' |
||
| 10 | ]; |
||
| 11 | var length = methods.length; |
||
| 12 | var console = (window.console = window.console || {}); |
||
| 13 | |||
| 14 | while (length--) { |
||
| 15 | method = methods[length]; |
||
| 16 | |||
| 17 | // Only stub undefined methods. |
||
| 18 | if (!console[method]) { |
||
| 19 | console[method] = noop; |
||
| 20 | } |
||
| 21 | } |
||
| 22 | }()); |
||
| 23 | |||
| 25 |