Skip to content

Commit

Permalink
* xover.dom.combine - added await to _applyScripts call
Browse files Browse the repository at this point in the history
  • Loading branch information
uriel-online committed Mar 24, 2024
1 parent e94f112 commit 92227ce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xo.js
Original file line number Diff line number Diff line change
Expand Up @@ -9414,7 +9414,6 @@ xover.dom.combine = async function (target, new_node) {
}
}
if (!(new_node instanceof Node)) return;

let _applyScripts = async function (targetDocument, scripts = []) {
for (let script of scripts) {
let promise;
Expand Down Expand Up @@ -9469,7 +9468,7 @@ xover.dom.combine = async function (target, new_node) {
if (script.hasAttribute("defer")) await promise;
}
}
_applyScripts(document, [...script_wrapper.children]);
await _applyScripts(document, [...script_wrapper.children]);
target.disconnected = false;
let post_render_scripts = new_node.selectNodes('.//*[self::html:script][@src]');
post_render_scripts.forEach(script => script_wrapper.append(script));
Expand Down

0 comments on commit 92227ce

Please sign in to comment.