aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-09-07 16:24:44 +0200
committerChocobozzz <me@florianbigard.com>2022-09-08 08:41:48 +0200
commit8b69f9f02879ee3cf72bc9d4aa96cc71f18e6eea (patch)
treea6021e5925dae0b6da1dbb57641719357f4c3b6a /client/src/app/+admin
parent08d2761097f8186d2a76ff1f01391401a5a089ef (diff)
downloadPeerTube-8b69f9f02879ee3cf72bc9d4aa96cc71f18e6eea.tar.gz
PeerTube-8b69f9f02879ee3cf72bc9d4aa96cc71f18e6eea.tar.zst
PeerTube-8b69f9f02879ee3cf72bc9d4aa96cc71f18e6eea.zip
Check admin config when loading the page
Avoid issues when an invalid config was set in the configuration file
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index 5cab9e9df..545e37857 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -292,6 +292,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
292 } 292 }
293 293
294 formValidated () { 294 formValidated () {
295 this.forceCheck()
296 if (!this.form.valid) return
297
295 const value: ComponentCustomConfig = this.form.getRawValue() 298 const value: ComponentCustomConfig = this.form.getRawValue()
296 299
297 forkJoin([ 300 forkJoin([
@@ -381,8 +384,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
381 this.customConfig = { ...config, instanceCustomHomepage: homepage } 384 this.customConfig = { ...config, instanceCustomHomepage: homepage }
382 385
383 this.updateForm() 386 this.updateForm()
384 // Force form validation 387 this.markAllAsDirty()
385 this.forceCheck()
386 }, 388 },
387 389
388 error: err => this.notifier.error(err.message) 390 error: err => this.notifier.error(err.message)