When attempting to serialize an object with a null relationship, the serialize() method crashed. I was going to make a PR, but my fork is already a bit customized to serialize the store to an object that doesn't contain any of the store methods so I can pass it to my ORM.
That said, I've tracked the issue down to this line. Essentially, self[key] is undefined when a null relationship is serialized, which causes the crash. This bit of code appears to fix it:
When attempting to serialize an object with a
null
relationship, theserialize()
method crashed. I was going to make a PR, but my fork is already a bit customized to serialize the store to an object that doesn't contain any of the store methods so I can pass it to my ORM.That said, I've tracked the issue down to this line. Essentially,
self[key]
isundefined
when anull
relationship is serialized, which causes the crash. This bit of code appears to fix it:I haven't fully tested, but just wanted to give a heads up. Thanks for building a great library!