I have run the following to disable console logs for production environments in my angular application. The below code works as expected for chrome, however, it still shows logs in IE 11.
main.ts
if (environment.production) {
enableProdMode();
if(window){
window.console.log=function(){};
}
}
Is this a polyfill issue? I wasn't able to find anything online about it.
EDIT
This question may seem similar but does not address my issue as to why overriding the console log function to a blank method works in chrome but not IE 11.