diff --git a/frontend/eslint.config.mjs b/frontend/eslint.config.mjs index 447afcfb80..bc3c1546ad 100644 --- a/frontend/eslint.config.mjs +++ b/frontend/eslint.config.mjs @@ -86,9 +86,10 @@ export default tsEslint.config( }, ], '@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions', 'constructors'] }], - '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', - //Turn off to allow ! in the code + //Turned off to allow ! in the code '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'off', + '@typescript-eslint/no-confusing-non-null-assertion': 'error', //Stylistic eslint rules diff --git a/frontend/src/app/components/keyresult-dialog/keyresult-dialog.component.ts b/frontend/src/app/components/keyresult-dialog/keyresult-dialog.component.ts index 5ef50d929c..986e552522 100644 --- a/frontend/src/app/components/keyresult-dialog/keyresult-dialog.component.ts +++ b/frontend/src/app/components/keyresult-dialog/keyresult-dialog.component.ts @@ -62,7 +62,7 @@ export class KeyresultDialogComponent { id: this.data.keyResult?.id } as KeyResultOrdinalDTO; keyResult.id = this.data.keyResult?.id; - keyResult.version = this.data.keyResult.version!; + keyResult.version = this.data.keyResult?.version!; keyResult.actionList = keyResult.actionList!.filter((action: Action) => action.action !== ''); this.keyResultService.saveKeyResult(keyResult) .subscribe((returnValue) => {