npm add [email protected]
Fixes support for undefined in JSONObject.
JSONObject again. Originally in Replicache, undefined was allowed in JSONObject properties and would be silently filtered out when you wrote the value. However doing this filtering was quite slow, so in Replicache 12, we disallowed undefined entirely. This change was very unpopular since certain common patterns result in undefined fields. In Replicache 13, we intended to reallow undefined. However the fix was incomplete and so undefined was typically still disallowed. The TypeScript type said that undefined was allowed, but a runtime error would still have occurred. This release makes undefined actually allowed. It should no longer throw an error at runtime.EventTarget dependency. We were assuming that the EventTarget interface was defined in the environment, but certain targets (ie React Native) don’t have it.push() and pull() if closed. If you called either of these with Replicache closed, the returned Promise would never fulfill. Now it does, with rejection.
undefined changes.