Skip to content

Commit

Permalink
Hotfix/cart button (#748)
Browse files Browse the repository at this point in the history
* Able to merge functionality

* remove console.log

* add bearer

* Allow for logging out and enable the procurement system to set the new cookie

* Fix case where cookie is set but no localstorage was set.

* set the auth header

* updates

* Revert "updates"

This reverts commit c15532e.

* Auto stash before revert of "updates"

* update the netlify origin

* add new line

* revert configurations

* Remove the TODO

* Update styling file type and add README to the new component

* Fixes to cart.checkout.btn
  • Loading branch information
aChanEP authored Jul 28, 2020
1 parent f6d4ce1 commit 728937c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/src/CartCheckoutButton/cart.checkout.btn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ function CartCheckoutButton(props: CartCheckoutButtonProps) {
} = props;

function getDescriptorUri() {
return cartData._descriptor[0]['cart-transfer-url'];
return cartData._descriptor?.[0]?.['cart-transfer-url'];
}

function checkout() {
if (getDescriptorUri()) {
window.location.href = cartData._descriptor[0]['cart-transfer-url'];
window.location.href = cartData._descriptor?.[0]?.['cart-transfer-url'];
Cookies.remove('Authorization');
} else {
checkoutCallback();
Expand Down

0 comments on commit 728937c

Please sign in to comment.