Skip to content

Commit

Permalink
Fix bug where inspect() would print "[Circular]" for object sub-pro…
Browse files Browse the repository at this point in the history
…perties
  • Loading branch information
TooTallNate committed Nov 9, 2023
1 parent 047597d commit a197c84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/sweet-dryers-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'nxjs-runtime': patch
---

Fix bug where `inspect()` would print "[Circular]" for object sub-properties
2 changes: 1 addition & 1 deletion packages/runtime/src/inspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function printObject(v: any, opts: InspectOptions) {
const parts = keys.map((k) => {
const l = `${k}: ${inspect(v[k], opts)}`;
len += l.length;
return `${k}: ${inspect(v[k], opts)}`;
return l;
});
if (len > 60) {
contents = parts.map((p) => `\n ${p}`).join('') + '\n';
Expand Down

0 comments on commit a197c84

Please sign in to comment.