Skip to content

Commit

Permalink
Revert "Cart quantity update issues (#593)" (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoboludo authored Sep 13, 2021
1 parent 8345f4a commit 4c5e0d1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions assets/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ class QuantityInput extends HTMLElement {
this.querySelectorAll('button').forEach(
(button) => button.addEventListener('click', this.onButtonClick.bind(this))
);

this.input.addEventListener('keydown', (event) => {
if (event.key !== 'Enter') return;
event.preventDefault();
this.input.dispatchEvent(this.changeEvent);
});
}

onButtonClick(event) {
Expand Down Expand Up @@ -162,7 +156,7 @@ const serializeForm = form => {
for (const key of formData.keys()) {
const regex = /(?:^(properties\[))(.*?)(?:\]$)/;

if (regex.test(key)) {
if (regex.test(key)) {
obj.properties = obj.properties || {};
obj.properties[regex.exec(key)[2]] = formData.get(key);
} else {
Expand Down

0 comments on commit 4c5e0d1

Please sign in to comment.