Skip to content

Commit

Permalink
Fix - Correction d'une possible null exception si aucune order n'est …
Browse files Browse the repository at this point in the history
…retournée par l'api
  • Loading branch information
noelmugnier committed Jun 16, 2021
1 parent a83e409 commit 06a3d13
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/stores/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ const store = () => {
query: GET_MOST_RECENT_CART,
errorsHandler,
success: (res) => {
if (!res) return;

if (currentOrder && res.id !== currentOrder.id)
update((state) => {
state.conflicts = [currentOrder, res];
Expand Down

0 comments on commit 06a3d13

Please sign in to comment.