Skip to content

Commit

Permalink
chore: code tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismclarke committed May 13, 2024
1 parent d989d64 commit 3072257
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app/shared/services/dynamic-data/dynamic-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,8 @@ export class DynamicDataService extends AsyncServiceBase {
/** Retrive json sheet data and merge with any user writes */
private async getInitialData(flow_type: FlowTypes.FlowType, flow_name: string) {
const flowData = await this.appDataService.getSheet(flow_type, flow_name);
const writeData = this.writeCache.get(flow_type, flow_name);
const writeDataArray = Object.entries(writeData || {}).map(([id, v]) => ({ ...v, id })) as
| IDocWithID[]
| [];
const writeData = this.writeCache.get(flow_type, flow_name) || {};
const writeDataArray: IDocWithID[] = Object.entries(writeData).map(([id, v]) => ({ ...v, id }));
const mergedData = this.mergeData(flowData?.rows, writeDataArray);
return mergedData;
}
Expand Down

0 comments on commit 3072257

Please sign in to comment.