diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index 0fc617434..bb22c49ab 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -474,12 +474,17 @@ export class DocumentDetailComponent }, error: (error) => { this.networkActive = false - this.error = error.error - this.toastService.showError( - $localize`Error saving document` + - ': ' + - (error.message ?? error.toString()) - ) + if (!this.userCanEdit) { + this.toastService.showInfo($localize`Document saved successfully.`) + this.close() + } else { + this.error = error.error + this.toastService.showError( + $localize`Error saving document` + + ': ' + + (error.message ?? error.toString()) + ) + } }, }) }