Created
June 18, 2019 11:32
-
-
Save pascaliske/a49c21fa759b4a7c997eaf646facf5df to your computer and use it in GitHub Desktop.
Prevent `console.log`overrides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (window) { | |
var log = window.console.log, fn = function () { return log; }; | |
Object.defineProperty(window.console, 'log', { set: fn, get: fn }); | |
})(window); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment