Skip to content

Commit

Permalink
refactor: improve length property
Browse files Browse the repository at this point in the history
  • Loading branch information
luckasnix committed Apr 27, 2024
1 parent 90a994a commit 66e0d36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/object-graph/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class ObjectGraph<NodeValue extends Record<string, unknown>> {
* @description Returns the length of the object graph.
*/
public get length() {
return Array.from(this.nodes.keys()).length;
return this.nodes.size;
}

/**
Expand Down

0 comments on commit 66e0d36

Please sign in to comment.