From 000bd085abb8a1c8786a3669498af62deb4770d9 Mon Sep 17 00:00:00 2001 From: William Date: Fri, 22 Nov 2024 14:09:32 +0100 Subject: [PATCH] =?UTF-8?q?-=20Correctif=20permettant=20de=20s=C3=A9l?= =?UTF-8?q?=C3=A9ctionn=C3=A9=20les=20champs=20tableau=20en=20profondeur.?= =?UTF-8?q?=20Exemple=20:=20[=20"acheteur.=5Fid",=20"acheteur.nom",=20"ven?= =?UTF-8?q?deur.=5Fid",=20"vendeur.nom",=20"lignes[*].vente.=5Fid"=20//=20?= =?UTF-8?q?Ne=20fonctionnnait=20pas=20auparavent=20]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/notation.js | 4 +++- src/utils.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/notation.js b/src/core/notation.js index dfe8763..4038146 100644 --- a/src/core/notation.js +++ b/src/core/notation.js @@ -858,7 +858,9 @@ class Notation { return false; } // console.log(' ยป setting', levelNotation, '=', value); - filtered.set(levelNotation, value, 'overwrite'); + if(originalNotation == levelNotation) { + filtered.set(levelNotation, value, 'overwrite'); + } } }); }, reverseIterateIfArray); diff --git a/src/utils.js b/src/utils.js index 47e81a0..315aea3 100644 --- a/src/utils.js +++ b/src/utils.js @@ -70,7 +70,7 @@ const utils = { return keyOrIndex && objProto.hasOwnProperty.call(collection, keyOrIndex); } if (typeof keyOrIndex === 'number') { - return keyOrIndex >= 0 && keyOrIndex < collection.length; + return keyOrIndex >= 0 && collection[keyOrIndex] !== undefined } return false; },