Skip to content

Commit

Permalink
loadRecommendations race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
supercid committed Jan 2, 2025
1 parent b5d96ed commit dff1eb6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions views/templates/hook/partials/js-auto-slots-inline.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,14 @@
slotsMoved = true;
}
});
if (slotsMoved && nostoRecosLoaded) {
api.loadRecommendations();
if (slotsMoved) {
if (nostoRecosLoaded) {
api.loadRecommendations();
} else {
api.listen('postrender', function () {
api.loadRecommendations();
});
}
}
}
};
Expand Down

0 comments on commit dff1eb6

Please sign in to comment.