Skip to content

Commit

Permalink
fix: ignore props in blocks verification
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianGille committed Oct 19, 2023
1 parent ae6c7f8 commit 763034b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/editor/src/js/template-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,21 @@ var templateCompiler = function (
undefined,
content._unwrap(),
blockDefs,
unwrapped
{
...unwrapped,
mainBlocks: {
...unwrapped.mainBlocks,
blocks: unwrapped.mainBlocks.blocks.map(item => {
// We ignore blockInformation prop from blocks and don't display modal
// if there is only this change between definition and current blocks
// Note: if you need to ignore an other prop inside blocks, you can add the prop in the line below
// For example:
// const { blockInformation, myOtherPropThatIWantIgnore, anOtherPropIgnored, ...restBlock } = item;
const { blockInformation, ...restBlock } = item;
return restBlock;
})
}
}
)
);
// if checkModelRes is 1 then the model is not fully compatible but we fixed it
Expand Down

0 comments on commit 763034b

Please sign in to comment.