From f3cc496f221ce05f1e4b70b2132c36f0d224fbf3 Mon Sep 17 00:00:00 2001 From: joao lopes Date: Wed, 30 Oct 2024 09:49:51 -0300 Subject: [PATCH] fix: review code changes --- src/jsonify/parse.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jsonify/parse.ts b/src/jsonify/parse.ts index 03859467228..ff8c67581d2 100644 --- a/src/jsonify/parse.ts +++ b/src/jsonify/parse.ts @@ -30,10 +30,10 @@ function unpack( custom: CustomParser | undefined, ): void { if (idx in hydrated) return; - + const current = arr[idx]; if (typeof current === "number") { - if(idx !== 0) { + if (idx !== 0) { hydrated[idx] = current; return; } @@ -153,8 +153,8 @@ function unpack( hydrated[idx] = actual; const keys = Object.keys(current); - for (const element of keys) { - const key = element; + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; // deno-lint-ignore no-explicit-any const ref = (current as any)[key]; if (ref < 0) {