Skip to content

Commit 013f4fc

Browse files
committed
fix: updateTemp's comment
1 parent 603f2b8 commit 013f4fc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/service-module/service-module.mutations.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,10 @@ export default function makeServiceMutations() {
138138
updateItems(state, items)
139139
},
140140

141-
// Adds an _id to a temp record so that that the addOrUpdate action
142-
// can migrate the temp to the keyedById state.
141+
// Promotes temp to "real" item:
142+
// - adds _id to temp
143+
// - removes __isTemp flag
144+
// - migrates temp from tempsById to keyedById
143145
updateTemp(state, { id, tempId }) {
144146
const temp = state.tempsById[tempId]
145147
if (temp) {

0 commit comments

Comments
 (0)