Skip to content

Hidden circular reference in angular removed on undo #42

@Madd0g

Description

@Madd0g

I have a tree-structure where I want to use undo/redo. Every leaf in the tree is shown by a directive, at runtime (when the directive starts), I assign a non-enumerable property to the leaf that points to its parent in the tree.

I use Object.defineProperty and set it to enumerable: false. All is good until I try to undo something in the tree and all the hidden attributes disappear from all the leaves.

If I define it as a non-hidden property, angular goes crazy with RangeError: Maximum call stack size exceeded.

Is there a way to work around this and have non-enumerable properties in objects watched by chronicle?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions