Skip to content

Commit

Permalink
no console.log in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
poliha committed Apr 23, 2020
1 parent 1ce874d commit ebd9e05
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));

0 comments on commit ebd9e05

Please sign in to comment.