From cff5e24658e5bed19a12a64a18b13b96b2119575 Mon Sep 17 00:00:00 2001
From: Simon Malesys <simon.malesys@pasteur.fr>
Date: Fri, 14 Feb 2025 11:24:52 +0100
Subject: [PATCH] Fix an async bug with the total

---
 src/client/store.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/client/store.ts b/src/client/store.ts
index 149d0f7..5d6111d 100644
--- a/src/client/store.ts
+++ b/src/client/store.ts
@@ -102,8 +102,8 @@ export const useStore = defineStore('store', {
     countAntibodies(countRequest: APICountParams): void {
       // Avoid to send an empty request to get an information
       // we already have in the stats.
-      if (Object.keys(countRequest).length === 0) {
-        this.antibodiesCount = this.statistics?.antibodies || 0
+      if (Object.keys(countRequest).length === 0 && this.statistics?.antibodies) {
+        this.antibodiesCount = this.statistics.antibodies
         return
       }
 
-- 
GitLab