dmonad / lib0

Monorepo of isomorphic utility functions
MIT License
347 stars 62 forks source link

array become object after encode/decode #28

Closed neoimale closed 1 year ago

neoimale commented 3 years ago

I found that the statement data instanceof Array in encoding.js is incorrect when checking arrays across iframe, which expected to be true.

Maybe Array.isArray is preferred? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#instanceof_vs_isarray

dmonad commented 1 year ago

This was the longest-standing issue here. This will be fixed in the next release!