diff --git a/frontend/src/app/edit/edit.component.ts b/frontend/src/app/edit/edit.component.ts index a9056501..8a10a625 100644 --- a/frontend/src/app/edit/edit.component.ts +++ b/frontend/src/app/edit/edit.component.ts @@ -152,7 +152,7 @@ export class EditComponent implements AfterViewInit, OnInit { console.log("Current Object:\n", this.currentContextMenuObject); let diffIndex = this.currentContextMenuObject.S3DiffIndex; if (!diffIndex) - this.currentContextMenuObject.ChildDiffs[0].S3DiffIndex; + diffIndex = this.currentContextMenuObject.ChildDiffs[0].S3DiffIndex; if (await this.versioningApiService.restoreVersion(this.editService.getMarkdownID() as string, diffIndex, this.currentContextMenuObject.Content)) { this.messageService.add({ severity: 'success',