Skip to content

Commit

Permalink
Merge pull request #24 from HCL-TECH-SOFTWARE/ryan/dev
Browse files Browse the repository at this point in the history
Fix TypeScript errors
  • Loading branch information
Stwissel authored Dec 18, 2023
2 parents a6ab6c1 + ebdbb02 commit 4c9be77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/store/databases/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,10 @@ export default function databaseReducer(
};
case APPEND_CONFIGURED_FORM:
return produce(state, (draft: DBState) => {
draft.forms[action.payload.formIndex].formModes.push(action.payload.data);
const formModes = draft.forms[action.payload.formIndex].formModes;
if (formModes !== undefined) {
formModes.push(action.payload.data);
}
});
case UNCONFIG_FORM:
return produce(state, (draft: DBState) => {
Expand Down
2 changes: 1 addition & 1 deletion src/store/databases/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export interface DBState {
dbName: string;
formName: string;
alias: Array<string>;
formModes: Array<any>;
formModes?: Array<any>;
formAccessModes: Array<any>;
}>;
loadedForm: string;
Expand Down

0 comments on commit 4c9be77

Please sign in to comment.