Skip to content

Commit 516dc54

Browse files
authored
Merge pull request #1618 from mjhmatt/CHECKOUT-4233
fix(checkout): CHECKOUT-4233 Cannot add wishlist with item when logged out
2 parents 58fcc5a + 9a4715f commit 516dc54

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

assets/js/theme/wishlist.js

-26
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import 'foundation-sites/js/foundation/foundation';
22
import 'foundation-sites/js/foundation/foundation.reveal';
33
import nod from './common/nod';
44
import PageManager from './page-manager';
5-
import { api } from '@bigcommerce/stencil-utils';
6-
import { defaultModal } from './global/modal';
75

86
export default class WishList extends PageManager {
97
constructor(context) {
@@ -59,29 +57,6 @@ export default class WishList extends PageManager {
5957
});
6058
}
6159

62-
wishListHandler() {
63-
$('body').on('click', '[data-wishlist]', event => {
64-
const wishListUrl = event.currentTarget.href;
65-
const modal = defaultModal();
66-
67-
event.preventDefault();
68-
69-
modal.open();
70-
71-
api.getPage(wishListUrl, this.options, (err, content) => {
72-
if (err) {
73-
return modal.updateContent(err);
74-
}
75-
76-
modal.updateContent(content, { wrap: true });
77-
78-
const $wishlistForm = $('.wishlist-form', modal.$content);
79-
80-
this.registerAddWishListValidation($wishlistForm);
81-
});
82-
});
83-
}
84-
8560
onReady() {
8661
const $addWishListForm = $('.wishlist-form');
8762

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

9267
this.wishlistDeleteConfirm();
93-
this.wishListHandler();
9468
}
9569
}

0 commit comments

Comments
 (0)