Skip to content

Commit 5a4935f

Browse files
committed
MC-18601: Page Builder Render
1 parent 72c8726 commit 5a4935f

File tree

2 files changed

+4
-30
lines changed
  • app/code/Magento/PageBuilder/view/adminhtml/web

2 files changed

+4
-30
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type-menu/edit.js

Lines changed: 2 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type-menu/edit.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,12 @@ export default class Edit {
4141
}
4242

4343
/**
44-
* Filter the data for storage
44+
* Serialize and unserialize the data to ensure it can be serialized in the future
4545
*
4646
* @param data
4747
*/
4848
private filterData(data: DataObject): DataObject {
49-
const filtered: DataObject = {};
50-
_.each(data, (value: any, key: string) => {
51-
if (_.isObject(value)) {
52-
value = this.filterData(value);
53-
}
54-
if (_.isArray(value) && _.isEmpty(value)) {
55-
value = [];
56-
}
57-
filtered[key] = value;
58-
});
59-
return filtered;
49+
return JSON.parse(JSON.stringify(data));
6050
}
6151

6252
/**

0 commit comments

Comments
 (0)