Skip to content

Commit 581eb07

Browse files
committed
MC-5691: Implement better developer error reporting
- Remove yarn-error.log - Update comments
1 parent 0a08e65 commit 581eb07

File tree

5 files changed

+7
-5491
lines changed

5 files changed

+7
-5491
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
static-error-log.xml
77
.DS_Store
88
.vscode
9-
.history/
9+
.history/
10+
/yarn-error.log

app/code/Magento/PageBuilder/view/adminhtml/web/js/master-format/read/configurable.js

Lines changed: 2 additions & 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/stage.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/master-format/read/configurable.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,12 @@ export default class Configurable implements ReadInterface {
9898
* @returns {HTMLElement}
9999
*/
100100
private findElementByName(element: HTMLElement, name: string): HTMLElement {
101+
// Create a clone of the element to avoid modifying the source
101102
const currentElement = $(element).clone();
102103
// Remove all child instances of data-role elements
103104
currentElement.find(`[${Config.getConfig("dataRoleAttributeName")}]`).remove();
104105

105-
// Find the element in the modified close with a matching element name
106+
// Attempt to find the content type element within the modified clone element
106107
return currentElement.attr("data-element") === name
107108
? currentElement[0]
108109
: currentElement[0].querySelector<HTMLElement>(`[data-element=${name}]`);

0 commit comments

Comments
 (0)