From 06a3d13fe8ac998d071d421bdb5f13a843259cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=ABl=20Mugnier?= Date: Wed, 16 Jun 2021 22:30:23 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20-=20Correction=20d'une=20possible=20null?= =?UTF-8?q?=20exception=20si=20aucune=20order=20n'est=20retourn=C3=A9e=20p?= =?UTF-8?q?ar=20l'api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/cart.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stores/cart.js b/src/stores/cart.js index 9d212ffb..e704a58f 100644 --- a/src/stores/cart.js +++ b/src/stores/cart.js @@ -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];