jco icon indicating copy to clipboard operation
jco copied to clipboard

Throw an error when passing arrays when expecting arraybuffers

Open guybedford opened this issue 2 years ago • 1 comments

This one caught me off-guard and seems like an easy footgun. Passing [1,2,3] into a Vec<u32> by mistake should give a clear error (or coercion?).

guybedford avatar Feb 10 '23 02:02 guybedford

At the moment, it just passes through an array buffer with invalid values without any warning or error.

guybedford avatar Feb 10 '23 02:02 guybedford