Skip to content

Commit

Permalink
Fix issue with JSON_ArrayIterate skipping first index
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyB123 committed Nov 16, 2022
1 parent 48e3dc9 commit 7b1a40e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ impl Plugin {
Some(v) => v.clone(),
None => return Ok(1),
};
*index += 1; // adding to the index here because -1 should be passed for the first iteration
let v = match v.as_array() {
Some(v) => v,
None => return Ok(1),
Expand All @@ -686,7 +687,6 @@ impl Plugin {

let v = self.json_nodes.alloc(v);
*output = v;
*index += 1;
Ok(0)
}

Expand Down

0 comments on commit 7b1a40e

Please sign in to comment.