Skip to content

Commit

Permalink
Merge pull request #1618 from mjhmatt/CHECKOUT-4233
Browse files Browse the repository at this point in the history
fix(checkout): CHECKOUT-4233 Cannot add wishlist with item when logged out
  • Loading branch information
junedkazi authored Jan 14, 2020
2 parents 58fcc5a + 9a4715f commit 516dc54
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions assets/js/theme/wishlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import 'foundation-sites/js/foundation/foundation';
import 'foundation-sites/js/foundation/foundation.reveal';
import nod from './common/nod';
import PageManager from './page-manager';
import { api } from '@bigcommerce/stencil-utils';
import { defaultModal } from './global/modal';

export default class WishList extends PageManager {
constructor(context) {
Expand Down Expand Up @@ -59,29 +57,6 @@ export default class WishList extends PageManager {
});
}

wishListHandler() {
$('body').on('click', '[data-wishlist]', event => {
const wishListUrl = event.currentTarget.href;
const modal = defaultModal();

event.preventDefault();

modal.open();

api.getPage(wishListUrl, this.options, (err, content) => {
if (err) {
return modal.updateContent(err);
}

modal.updateContent(content, { wrap: true });

const $wishlistForm = $('.wishlist-form', modal.$content);

this.registerAddWishListValidation($wishlistForm);
});
});
}

onReady() {
const $addWishListForm = $('.wishlist-form');

Expand All @@ -90,6 +65,5 @@ export default class WishList extends PageManager {
}

this.wishlistDeleteConfirm();
this.wishListHandler();
}
}

0 comments on commit 516dc54

Please sign in to comment.