Skip to content

Commit

Permalink
Merge pull request #52 from usmanmaqbool636/fix/id-undefined
Browse files Browse the repository at this point in the history
`useHistory`  id undefined issue fixed
  • Loading branch information
ashbuilds authored Oct 19, 2024
2 parents 63dd0c5 + 3e04880 commit 1242998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/Compose/hooks/useHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const useHistory = () => {
const clearHistory = useCallback(() => {
const latestHistory = { ...getLatestHistory() }
Object.keys(latestHistory).forEach((k) => {
if (!k.startsWith(id.toString())) {
if (!k.startsWith(id?.toString())) {
delete latestHistory[k]
}
})
Expand Down

0 comments on commit 1242998

Please sign in to comment.