Skip to content

Fix new/temp records getting added to the store

Compare
Choose a tag to compare
@marshallswain marshallswain released this 10 Nov 02:50
· 654 commits to master since this release

This fixes the ability to create new model instances without needing to provide any arguments to the constructor.

Calling new MyModelClass() without providing any arguments was not resulting in any temp records getting added to the store. For cases where an empty object was provided, the tempId was not getting properly assigned.

This means that these two are now equivalent:

new User()
new User({})