Skip to content

Commit 976c1f8

Browse files
authored
[MergeDups] Fix bug preventing use of extra column (#3548)
1 parent 74feaaa commit 976c1f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/goals/MergeDuplicates/Redux/MergeDupsReducer.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
} from "goals/MergeDuplicates/Redux/reducerUtilities";
2929
import { StoreActionTypes } from "rootRedux/actions";
3030
import { type Hash } from "types/hash";
31+
import { newWord } from "types/word";
3132

3233
const mergeDuplicatesSlice = createSlice({
3334
name: "mergeDupStepReducer",
@@ -144,7 +145,7 @@ const mergeDuplicatesSlice = createSlice({
144145
});
145146

146147
// Check if nothing to merge.
147-
const wordToUpdate = state.data.words[wordId];
148+
const wordToUpdate = state.data.words[wordId] || newWord();
148149
if (isEmptyMerge(wordToUpdate, mergeWord)) {
149150
continue;
150151
}

0 commit comments

Comments
 (0)