You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you pass an initialized collection to a State constructor it won't detect that the collection is already initialized. Instead it will read it as an object and wrap it in a new collection.
Is there a way to bypass the auto-initialization in constructors.
Could this be achieved by type-checking?
Example which does not work:
var myCollection = new MyCollection();
var myState = new MyState({someChildCollection: myCollection });
Exampe that does work:
var myCollection = new MyCollection();
var myState = new MyState();
myState.someChildCollection = myCollection;
The text was updated successfully, but these errors were encountered:
When you pass an initialized collection to a State constructor it won't detect that the collection is already initialized. Instead it will read it as an object and wrap it in a new collection.
Is there a way to bypass the auto-initialization in constructors.
Could this be achieved by type-checking?
Example which does not work:
var myCollection = new MyCollection();
var myState = new MyState({someChildCollection: myCollection });
Exampe that does work:
var myCollection = new MyCollection();
var myState = new MyState();
myState.someChildCollection = myCollection;
The text was updated successfully, but these errors were encountered: