kiliman / remix-typedjson

This package is a replacement for superjson to use in your Remix app. It handles a subset of types that `superjson` supports, but is faster and smaller.
MIT License
435 stars 19 forks source link

Problem with deep object and a shallow value #4

Closed frontsideair closed 2 years ago

frontsideair commented 2 years ago

Sorry to be the bearer of the bad news, but I may have stumbled upon another bug. This is the payload:

  return typedjson(
    { data: [{ greeting: "hello", today: new Date() }], counter: 1 },
  );

And the StackBlitz link: https://stackblitz.com/edit/github-gbcwza-6tcdt7?file=app%2Froutes%2Ftest.tsx

counter is null and its meta is "undefined". Doesn't change when it's a string either.

kiliman commented 2 years ago

Thanks, I've fixed the issue, but broke something else. I should have this working soon.

kiliman commented 2 years ago

Fixed in v0.0.8