Commit 3166c464 authored by Emily Jensen's avatar Emily Jensen

Adds null to backupCode: string

parent 198cbf1f
......@@ -33,7 +33,7 @@ export class ManageBackupCodeContainer {
) {
this.store
.select(selectManageBackupCodeNewBackupCode)
.subscribe(backupCode => (this.backupCode = backupCode));
.subscribe(backupCode => (backupCode ? this.backupCode = backupCode : null));
}
getBackupPDF() {
......
......@@ -20,7 +20,7 @@ export interface IForm {
export interface IState extends IBaseFormState {
form: FormGroupState<IForm>;
errorMessage: string | null;
newBackupCode: string;
newBackupCode: string | null;
}
const validateAndUpdateFormState = updateGroup<IForm>({
......@@ -39,7 +39,7 @@ const initialState: IState = {
form: initialFormState,
hasFinished: false,
hasStarted: false,
newBackupCode: "",
newBackupCode: null,
errorMessage: null
};
......@@ -61,7 +61,7 @@ export function reducer(
hasStarted: true,
hasFinished: false,
errorMessage: null,
newBackupCode: ""
newBackupCode: null
};
case ManageBackupCodeActionTypes.SUBMIT_FORM_SUCCESS:
......@@ -79,7 +79,7 @@ export function reducer(
errorMessage: "An error occured",
hasFinished: false,
hasStarted: false,
newBackupCode: ""
newBackupCode: null
};
case ManageBackupCodeActionTypes.RESET_FORM:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment