diff --git a/src/views/settings/components/Instance.vue b/src/views/settings/components/Instance.vue index 5e016d1a..e3dacea2 100644 --- a/src/views/settings/components/Instance.vue +++ b/src/views/settings/components/Instance.vue @@ -181,7 +181,10 @@ export default { async onSubmit() { try { await this.$store.dispatch('SubmitChanges') - await this.$store.dispatch('UpdateInstanceDocs', { name: 'instance-panel', content: this.editorContent }) + await this.$store.dispatch('UpdateInstanceDocs', { + name: 'instance-panel', + content: this.editorContent.length > 0 ? this.editorContent : this.instancePanelContent + }) } catch (e) { return } diff --git a/src/views/settings/components/Other.vue b/src/views/settings/components/Other.vue index 925fef81..0a697138 100644 --- a/src/views/settings/components/Other.vue +++ b/src/views/settings/components/Other.vue @@ -114,12 +114,15 @@ export default { }, methods: { handleEditorUpdate(content) { - this.editorContent = content + this.termsOfServices = content }, async onSubmit() { try { await this.$store.dispatch('SubmitChanges') - await this.$store.dispatch('UpdateInstanceDocs', { name: 'terms-of-service', content: this.editorContent }) + await this.$store.dispatch('UpdateInstanceDocs', { + name: 'terms-of-service', + content: this.termsOfServices.length > 0 ? this.termsOfServices : this.termsOfServicesContent + }) } catch (e) { return }