Skip to content

Commit

Permalink
fix: improve updateBlocksProps for list of images prop
Browse files Browse the repository at this point in the history
  • Loading branch information
AliGhaleyan authored and surajair committed Oct 24, 2024
1 parent c89db8e commit f0d167b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/history/useBlocksStoreManager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ChaiBlock } from "../types/ChaiBlock.ts";
import { useBlocksStore } from "./useBlocksStoreUndoableActions.ts";
import { find, omit } from "lodash-es";
import { merge } from "lodash";
import { removeNestedBlocks } from "../hooks/useRemoveBlocks.ts";
import { insertBlocksAtPosition } from "./InsertBlocksAtPosition.ts";
import { moveBlocksWithChildren } from "./moveBlocksWithChildren.ts";
Expand Down Expand Up @@ -33,7 +34,7 @@ export const useBlocksStoreManager = () => {
return prevBlocks.map((block) => {
if (blocksIds.includes(block._id)) {
const props = find(blocks, { _id: block._id });
return { ...block, ...omit(props, "_id") };
return merge({}, block, {...omit(props, "_id")});
}
return block;
});
Expand Down

0 comments on commit f0d167b

Please sign in to comment.