Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

recursive nested object error #132

Closed
naivefun opened this issue Apr 6, 2018 · 2 comments
Closed

recursive nested object error #132

naivefun opened this issue Apr 6, 2018 · 2 comments

Comments

@naivefun
Copy link

naivefun commented Apr 6, 2018

With a treenode example:

class Node {
  @prop()
  name: string;
  @arrayProp({ items: Node})
  children: Node[];
}

Here is the error:

exports.clone = function clone(obj, options) {
                              ^

RangeError: Maximum call stack size exceeded
@holywyvern
Copy link

Write it as a reference.

class Node {
  @arrayProp({ itemsRef: Node })
  children: Node[];
}

@hasezoey
Copy link
Contributor

@Ben305 Duplicate of #19

@Ben305 Ben305 closed this as completed Sep 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants