Skip to content

Bug: Only a few levels are printed in pretty mode #285

@jakubhruby

Description

@jakubhruby

Describe the bug
Only a few levels are printed in pretty mode. It's caused by broken _extend function, which ignores depth settings, therefore the hardcoded depth with value 2 is applied.

To Reproduce
Try to log an object with 3+ depth - only 3 levels are pretty printed, the deeper levels are represented with [object Object] string
https://codepen.io/jakubhruby/pen/OJYgzbR?editors=1111

Expected behavior
Full depth object is printed.

Screenshots
Snímek obrazovky z 2024-06-06 12-44-09

Here is the code which tries to assign opts (which includes dept: Infinite) to ctx, but it doesn't and ctx remains untouched. Below the default 2 is assigned to ctx.depth which limits output to three levels.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions