Skip to content

Commit

Permalink
Allow the wishlist-action-handler to be deferred
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Nov 19, 2024
1 parent 8288f93 commit 02c756b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/Resources/public/js/wishlist-action-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,5 @@ class WishlistActionHandler {
});
}
}

new WishlistActionHandler(window.ssWishlist || {});
5 changes: 1 addition & 4 deletions src/Resources/views/shop/_javascripts.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
<script src="{{ asset('bundles/setonosyliuswishlistplugin/js/wishlist-action-handler.js') }}"></script>
<script>
const wishlistActionHandler = new WishlistActionHandler();
</script>
<script src="{{ asset('bundles/setonosyliuswishlistplugin/js/wishlist-action-handler.js') }}" defer></script>

0 comments on commit 02c756b

Please sign in to comment.