Skip to content

Commit fdafe15

Browse files
OP-557 - upgrade to Sylius 2.0 - updated readme from jquery to vanillajs
1 parent c65ef60 commit fdafe15

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

doc/installation.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,11 @@ SyliusShopBundle `templates/shop/javascripts.html.twig`:
154154
...
155155
{{ encore_entry_script_tags('bitbag-mail-chimp-shop', null, 'mail-chimp-shop') }}
156156
<script>
157-
document.addEventListener("DOMContentLoaded", function(event) {
158-
$('#footer-newsletter-form').joinNewsletter();
157+
document.addEventListener('DOMContentLoaded', function () {
158+
var form = document.querySelector('#footer-newsletter-form');
159+
if (form) {
160+
joinNewsletter(form);
161+
}
159162
});
160163
</script>
161164
```

0 commit comments

Comments
 (0)