Skip to content

Commit

Permalink
Merge pull request #1 from RemyLasseigne/main
Browse files Browse the repository at this point in the history
fix js mutation observer
  • Loading branch information
pvasdoria authored Jan 16, 2023
2 parents 35980b8 + f54bd24 commit 1586985
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Resources/private/js/shop.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const initDropDownSyliusAutocomplete = () => {
const targetNode = document.querySelector("form.ui.loadable.form div[data-form-collection='list']");
const config = { childList: true };
const observerRefresh = new MutationObserver((e) => {
e.forEach(({target, addedNodes}) => {
var target = addedNodes.item((addedNodes.length -1));
e.forEach(({target}) => {
var target = target.children.item((target.children.length -1));
$(target).find('.sylius-autocomplete.ui.fluid.search.selection.dropdown').productVariantAutoComplete();
})
});
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/public/shop-quick-shopping.min.js

Large diffs are not rendered by default.

0 comments on commit 1586985

Please sign in to comment.