[Glitch] Fix selected account being lost when creating a collection
Port f6969f71f886d24f13e182a31209a8cab3735787 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
1403a21fe8
commit
92afbdc840
3 files changed
+38
-6
No files matched your search
@@ -111,8 +111,11 @@ const collectionSlice = createSlice({
|
||||
items: getEditorCollectionItems(collection.items),
|
||||
};
|
||||
},
|
||||
reset(state) {
|
||||
state.editor = initialCollectionState.editor;
|
||||
reset(state, action: PayloadAction<EditorCollectionItem | undefined>) {
|
||||
state.editor =
|
||||
action.payload !== undefined
|
||||
? { ...initialCollectionState.editor, items: [action.payload] }
|
||||
: initialCollectionState.editor;
|
||||
},
|
||||
updateEditorField<K extends keyof EditorState>(
|
||||
state: CollectionState,
|
||||
|
||||
Reference in new issue
Block a user