Skip to content

Commit

Permalink
fix: review code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DevJoaoLopes committed Oct 30, 2024
1 parent 3da5472 commit f3cc496
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/jsonify/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit f3cc496

Please sign in to comment.