Skip to content

Commit fc7b91f

Browse files
committed
MC-5232: Prefix field names with section name to avoid field name collision
- Update return types - Typehint string in UIComponentConfig - Utilise underscore for isUndefined check
1 parent b8cd983 commit fc7b91f

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

app/code/Magento/PageBuilder/Model/Stage/Config/UiComponentConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ function ($item, $key) {
7474
*
7575
* @param array $array
7676
* @param string $path
77-
* @param string $value
77+
* @param string|array $value
7878
*/
79-
private function generateFieldArray(array &$array, $path, $value)
79+
private function generateFieldArray(array &$array, string $path, $value)
8080
{
8181
$keys = explode(".", $path);
8282

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

Lines changed: 2 additions & 2 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/js/content-type/block/preview.js

Lines changed: 1 addition & 1 deletion
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/js/content-type/master.js

Lines changed: 1 addition & 1 deletion
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55

66
import events from "Magento_PageBuilder/js/events";
7+
import _ from "underscore";
78
import ContentTypeInterface from "../content-type.d";
89
import DataStore, {DataObject} from "../data-store";
910

@@ -50,7 +51,7 @@ export default class Edit {
5051
let formNamespace = this.instance.config.form;
5152

5253
// Use the default form unless a custom one is defined
53-
if (undefined !== this.instance.config.appearances[appearance].form) {
54+
if (!_.isUndefined(this.instance.config.appearances[appearance].form)) {
5455
formNamespace = this.instance.config.appearances[appearance].form;
5556
}
5657

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/converter/converter-interface.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ interface ConverterInterface {
1212
/**
1313
* Convert value to internal format
1414
*
15-
* @param value any
16-
* @returns {string | object}
15+
* @param value
16+
* @returns {any}
1717
*/
1818
fromDom(value: any): any;
1919

@@ -22,7 +22,7 @@ interface ConverterInterface {
2222
*
2323
* @param {string} name
2424
* @param {DataObject} data
25-
* @returns {string | object}
25+
* @returns {any}
2626
*/
2727
toDom(name: string, data: DataObject): any;
2828
}

0 commit comments

Comments
 (0)