Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit 03762e7

Browse files
authored
fix(gui): crash when importing incomplete annotation files (#817)
* fix(gui): crash when importing incomplete annotation files * fix(gui): missing word
1 parent 04a8114 commit 03762e7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

api-editor/gui/src/features/annotations/annotationSlice.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,10 @@ const annotationsSlice = createSlice({
384384
updateQueue(state);
385385
},
386386
mergeAnnotationStore(state, action: PayloadAction<AnnotationStore>) {
387-
state.annotations = mergeAnnotationStores(state.annotations, action.payload);
387+
state.annotations = mergeAnnotationStores(state.annotations, {
388+
...initialAnnotationStore,
389+
...action.payload,
390+
});
388391

389392
updateQueue(state);
390393
},

api-editor/gui/src/features/menuBar/DeleteAllAnnotations.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const DeleteAllAnnotations = function () {
5353
<strong>Are you sure?</strong>
5454
</ChakraText>
5555
<ChakraText>
56-
Hint: Consider exporting your work first selecting "File &gt; Export &gt;
56+
Hint: Consider exporting your work first by selecting "File &gt; Export &gt;
5757
Annotations" in the menu bar.
5858
</ChakraText>
5959
</VStack>

0 commit comments

Comments
 (0)