From ebd9e059d9d7774b54af32442b9eff79cb678977 Mon Sep 17 00:00:00 2001 From: oliha Date: Thu, 23 Apr 2020 00:35:20 -0400 Subject: [PATCH] no console.log in prod --- src/main.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 26443c2..378547d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,9 +8,12 @@ import { InjectorService } from './app/providers/injector.service'; if (environment.production) { enableProdMode(); + if (window) { + window.console.log = function () {}; + } } platformBrowserDynamic() .bootstrapModule(AppModule) - .then(loadedModule => InjectorService.setInjector(loadedModule.injector)) - .catch(err => console.log(err)); + .then((loadedModule) => InjectorService.setInjector(loadedModule.injector)) + .catch((err) => console.log(err));