ractivejs / ractive

Next-generation DOM manipulation
http://ractive.js.org
MIT License
5.94k stars 396 forks source link

Date values being converted to empty objects when using get() #3388

Closed barron-j closed 1 year ago

barron-j commented 3 years ago

Description:

Ractive.get() returns date values as empty objects.

Versions affected:

Ractive.js v1.3.14
Build: 76470bafd78eddd27baa1425ed3f9475242d1c34
Date: Sat Dec 12 2020 08:01:19 GMT+0000 (UTC)

Reproduction:

https://jsfiddle.net/wg80a173/2/

evs-chris commented 3 years ago

I believe I have a reasonable-ish resolution for this on edge once Travis finishes Travis-ing. I know there's some weird magic thing that happens when dates come in from another realm (iframes maybe) such that you shouldn't use instanceof, but in this case I think it's probably unlikely enough that we can address it if it ever arises. As it would happen, I ran into a similar issue with a deep set and a date today too.

evs-chris commented 1 year ago

Good and bad are now the same in the example, so I'm going to call this one good.