Skip to content

Commit

Permalink
Track the src URL after changing it, not before
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
brandonkelly committed Sep 27, 2023
1 parent 187aed0 commit fc3cc36
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/web/assets/cp/src/js/Craft.js
Original file line number Diff line number Diff line change
Expand Up @@ -1842,10 +1842,6 @@ $.extend(Craft, {
.map((n) => n.src.replace(/&/g, '&'));
}

if (this._existingJs.includes(node.src)) {
return false;
}

// if this is a cross-domain JS resource, use our app/resource-js proxy to load it
if (
node.src.startsWith(this.resourceBaseUrl) &&
Expand All @@ -1856,6 +1852,10 @@ $.extend(Craft, {
});
}

if (this._existingJs.includes(node.src)) {
return false;
}

this._existingJs.push(node.src);
}

Expand Down

0 comments on commit fc3cc36

Please sign in to comment.