From 9f40eb234d0f85cd64e5c723568a28ba3aa39900 Mon Sep 17 00:00:00 2001
From: build-token <build-token>
Date: Mon, 13 May 2024 07:45:06 +0000
Subject: [PATCH] publish: Merge branch 'feat/add-response-type' into 'dev'

generated from commit af192d23d34dd792c862780eaf73ce1517861a0f
---
 index.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index e899336..e5d11c9 100644
--- a/index.js
+++ b/index.js
@@ -193,7 +193,8 @@ async function getData(token, idPCE, startDate, endDate) {
     })
     .then(result => {
       return result.match(/.+/g).map(s => {
-        result = JSON.parse(s)
+        /** @type {import('./types').GRDFDataRange} */
+        const result = JSON.parse(s)
         if (result.statut_restitution !== null) {
           /**
            * Handle no data issue when retrieving grdf data.
-- 
GitLab