restore the console methods

the ones discord fucks up, making stack traces useless
This commit is contained in:
Astra 2018-04-28 08:17:03 -04:00
parent a9f2b9af53
commit 97fffd9fef
1 changed files with 4 additions and 0 deletions

View File

@ -73,6 +73,10 @@
// post-init payload
document.addEventListener('ep-ready', () => {
// restore the original console methods
var origConsole = wc.findCache('_originalConsoleMethods')[0].exports._originalConsoleMethods;
Object.keys(origConsole).forEach(x => global.console[x] = origConsole[x]);
// disable analytics
$api.util.findFuncExports("AnalyticEventConfigs").default.track = () => { };