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
Calling (new AModel()).toJSON() results with error as above.
In the function Mutator.prototype.toJSON there is an assumption the mutator has always get method defined (under 'get' key of the mutator object or the mutator is a 'getter' itself). This is obviously wrong and such a check should be added:
Yep. I hit that problem recently.
That was one of the reasons I avoided to reference 'this' within a mutator function to the model itself.
Would you like to put together a pull request?
Minimal example:
Calling
(new AModel()).toJSON()
results with error as above.In the function
Mutator.prototype.toJSON
there is an assumption the mutator has alwaysget
method defined (under 'get' key of the mutator object or the mutator is a 'getter' itself). This is obviously wrong and such a check should be added:The text was updated successfully, but these errors were encountered: