reflect-metadata icon indicating copy to clipboard operation
reflect-metadata copied to clipboard

Cross-browser error

Open code-elf opened this issue 7 years ago • 1 comments

In 0.1.5, the function GenRandomBytes was changed - instead of writing an array into a variable, passing it as a parameter to crypto.getRandomValues and then returning that variable, it now returns the return value of crypto.getRandomValues directly. According to the TS lib declaration file, this is correct - but I have found that on certain older browsers (such as the Android browser) crypto.getRandomValues returns no value and only mutates the parameter. Since version 0.1.5, this library therefore causes a TypeError on these browsers. I would like to request the change to GenRandomBytes be reverted in the interest of cross-browser compatibility.

code-elf avatar Dec 23 '17 13:12 code-elf

This appears to have been fixed in this PR. https://github.com/rbuckton/reflect-metadata/pull/64/commits/822def6348c2d0b97c84993a77e896b958f7d130 Would be nice if this was merged 😄

elmarti avatar May 31 '18 13:05 elmarti