Skip to content

Commit

Permalink
also log the script src
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Oct 30, 2023
1 parent 177b107 commit b197649
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/src/Vis/visEngine.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1427,9 +1427,8 @@ class VisEngine extends React.Component {
*/

static async loadScriptsOfOneWidgetSet(widgetSet) {
for (let i = 0; i < widgetSet.length; i++) {
for (const { oldScript, newScript } of widgetSet) {
try {
const { oldScript, newScript } = widgetSet[i];
newScript.appendChild(document.createTextNode(oldScript.innerHTML));
oldScript.parentNode.replaceChild(newScript, oldScript);

Expand All @@ -1438,7 +1437,7 @@ class VisEngine extends React.Component {
newScript.onload = resolve;
});
} catch (e) {
console.error(`Cannot load script: ${JSON.stringify(e)}`);
console.error(`Cannot load script "${newScript.src}": ${JSON.stringify(e)}`);
}
}
}
Expand Down

0 comments on commit b197649

Please sign in to comment.