maqetta/maqetta — comment on commit 8e1193ae60e0c589631f3c0f168773d99cde4b12
File:  line 0
By JonFerraiolo:

I can't see how there would be circular references if we do a deep clone.

The circular reference problem (which causes dojo.toJson to fail) was due to passing a reference to one of the original subobjects on the widget.json object, and then on first use, the dojo machinery (probably ItemFileReadStore) decorates that original (sub)object with a bunch of pointers for internal use. The second time through fails because the original object is passed in again with all of the decorations from the first use. The "decorations" are inside the object a couple of levels deep.