Skip to content

Commit

Permalink
fix: head-support race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
stukennedy committed Jul 9, 2024
1 parent 03b3018 commit dfba1c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/head-support/head-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
// store a reference to the internal API.
api = apiRef;

htmx.on('htmx:afterSwap', function(evt){
htmx.on('htmx:afterSettle', function(evt){
var serverResponse = evt.detail.xhr.response;
if (api.triggerEvent(document.body, "htmx:beforeHeadMerge", evt.detail)) {
mergeHead(serverResponse, evt.detail.boosted ? "merge" : "append");
Expand Down

0 comments on commit dfba1c0

Please sign in to comment.