]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/environment.ts
Client: adjust viewport height
[github/Chocobozzz/PeerTube.git] / client / src / app / environment.ts
index 8bba89c4ecb139ea78fb7e25973b8a68f1414655..929e09490c763509888426f9302eacd3819c8778 100644 (file)
@@ -4,19 +4,24 @@
 import { enableDebugTools, disableDebugTools } from '@angular/platform-browser';
 import { enableProdMode, ApplicationRef } from '@angular/core';
 // Environment Providers
-let PROVIDERS = [
+let PROVIDERS: any[] = [
   // common env directives
 ];
 
 // Angular debug tools in the dev console
 // https://github.com/angular/angular/blob/86405345b781a9dc2438c0fbe3e9409245647019/TOOLS_JS.md
-let _decorateModuleRef = function identity(value) { return value; };
+let _decorateModuleRef = function identity<T>(value: T): T { return value; };
 
 if ('production' === ENV) {
-  // Production
-  disableDebugTools();
   enableProdMode();
 
+  // Production
+  _decorateModuleRef = (modRef: any) => {
+    disableDebugTools();
+
+    return modRef;
+  };
+
   PROVIDERS = [
     ...PROVIDERS,
     // custom providers in production