Skip to content

Commit 6640979

Browse files
samatar26markerikson
authored andcommitted
refactor: get new ids from state.entities rather than state.ids
1 parent edcd3b3 commit 6640979

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/toolkit/src/entities/unsorted_state_adapter.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,7 @@ export function createUnsortedStateAdapter<T>(
158158
0
159159

160160
if (didMutateIds) {
161-
state.ids = Array.from(
162-
new Set(state.ids.map((id) => newKeys[id] || id))
163-
)
161+
state.ids = Object.keys(state.entities)
164162
}
165163
}
166164
}

0 commit comments

Comments
 (0)