Skip to content

Commit

Permalink
handle dates
Browse files Browse the repository at this point in the history
  • Loading branch information
mishraomp committed Feb 26, 2024
1 parent 98892d8 commit 9c5a46d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/features/omrr/omrr-slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ export const omrrSlice = createSlice({
const individualData = {
...item
}
individualData['Effective/Issue Date'] = new Date(item['Effective/Issue Date']).toLocaleDateString();
if(individualData['Effective/Issue Date']){
individualData['Effective/Issue Date'] = new Date(item['Effective/Issue Date']).toLocaleDateString();
}else{
individualData['Effective/Issue Date'] = undefined;
}
if(item['Last Amendment Date']){
individualData['Last Amendment Date'] = new Date(item['Last Amendment Date']).toLocaleDateString();
}else{
Expand Down

0 comments on commit 9c5a46d

Please sign in to comment.