Skip to content

Better check for temp records in resetCopy mutation

Compare
Choose a tag to compare
@marshallswain marshallswain released this 11 Nov 08:13
· 632 commits to master since this release

fix check for temp record

Checking for the presence of the idField on a record is a better indicator of if the record is a temp. It beats checking for the lack of an __id field, because in Vue it’s sometimes a pain in the butt to get rid of properties thanks to using getters and setters for reactivity. This won’t be necessary once 3.0 ships with proxy-based reactivity.

This fixes an error that would sometimes occur if the original record cannot be found because it still contains an __isTemp property.