Skip to content

Commit

Permalink
fix: create object with the new plainName param added
Browse files Browse the repository at this point in the history
  • Loading branch information
masterprog-cmd committed Sep 30, 2024
1 parent c2fc75f commit 9df1be6
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ export const fetchRecentsThunk = createAsyncThunk<void, void, { state: RootState

const recentsWithoutHiddenFiles = excludeHiddenItems(recents);

recentsWithoutHiddenFiles.forEach((item) => (item.plainName = item.plain_name));
const recentsWithPlainNameParam = recentsWithoutHiddenFiles.map((item) => ({
...item,
plainName: item.plain_name,
}));

dispatch(storageActions.clearSelectedItems());
dispatch(storageActions.setRecents(recentsWithoutHiddenFiles));
dispatch(storageActions.setRecents(recentsWithPlainNameParam));
},
);

Expand Down

0 comments on commit 9df1be6

Please sign in to comment.