Skip to content

Commit

Permalink
Prevent potential undefined exception (#1764)
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye authored Jun 22, 2023
1 parent b7ea5b3 commit 006bd10
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ export class LexiconEditorController implements angular.IController {
failCallback: (reason?: any) => void = () => { }) => {
const isNewEntry = LexiconEditorController.entryIsNew(this.currentEntry);
if (isNewEntry) {
// We have to wait for the initial save to complete so that we have
await this.saving$.promise;
// We have to wait for the initial save to complete so that we save with the same entry ID
await this.saving$?.promise;
}

this.saving$ = this.$q.defer<void>();
Expand Down

0 comments on commit 006bd10

Please sign in to comment.