]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - client/src/main.ts
Fix audio upload if not enabled by instance
[github/Chocobozzz/PeerTube.git] / client / src / main.ts
... / ...
CommitLineData
1import { ApplicationRef, enableProdMode } from '@angular/core'
2import { enableDebugTools } from '@angular/platform-browser'
3import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
4import { AppModule } from './app/app.module'
5import { environment } from './environments/environment'
6
7if (environment.production) {
8 enableProdMode()
9}
10
11const bootstrap = () => platformBrowserDynamic()
12 .bootstrapModule(AppModule)
13 .then(bootstrapModule => {
14 if (!environment.production) {
15 const applicationRef = bootstrapModule.injector.get(ApplicationRef)
16 const componentRef = applicationRef.components[0]
17
18 // allows to run `ng.profiler.timeChangeDetection();`
19 enableDebugTools(componentRef)
20 }
21
22 return bootstrapModule
23 })
24 .catch(err => {
25 console.error(err)
26 return null
27 })
28
29bootstrap()