Skip to content

Commit

Permalink
reusable widget id mismatch error check
Browse files Browse the repository at this point in the history
  • Loading branch information
ote82 committed Dec 6, 2023
1 parent cc5a99f commit 09d618d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion analogic/static/assets/js/framework/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,19 @@ window.onerror = (msg, url, lineNum, colNum, error) => {

app.clickEvent = Utils.isMobile() ? 'touchstart' : 'click touchstart';

let wc, i;
let wc, i, j;

for (i in WidgetConfig) {
wc = WidgetConfig[i];

if (wc.type) {
loadWidget(wc);
} else {
for (j in wc) {
if (wc[j].id !== j) {
console.error('Widget id "' + wc[j].id + '" mismatch with reusable "' + j + '" in reusable collection "' + i + '". Widget id should be "' + j + '"');
}
}
}
}

Expand Down

0 comments on commit 09d618d

Please sign in to comment.