Skip to content

Commit 006bd10

Browse files
authored
Prevent potential undefined exception (#1764)
1 parent b7ea5b3 commit 006bd10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/angular-app/languageforge/lexicon/editor/editor.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,8 @@ export class LexiconEditorController implements angular.IController {
359359
failCallback: (reason?: any) => void = () => { }) => {
360360
const isNewEntry = LexiconEditorController.entryIsNew(this.currentEntry);
361361
if (isNewEntry) {
362-
// We have to wait for the initial save to complete so that we have
363-
await this.saving$.promise;
362+
// We have to wait for the initial save to complete so that we save with the same entry ID
363+
await this.saving$?.promise;
364364
}
365365

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

0 commit comments

Comments
 (0)