HaxeFoundation / HaxeFoundation/haxe
[js] Browser.supported false positive check on react native
Open
platform-javascript
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
`js.Browser.supported` returns `true` in react native environment which in turn leads to crash in `HttpJs`, 63 where protocol is determined: `js.Browser.location.protocol.toLowerCase(); `
Suggestion is either update `js.Browser.supported` so that it will be a bit smarter and also check relevant properties of `window` like `location`, or add `try...catch` into HttpJs for this particular case (although I wonder where else false-positive `js.Browser.supported` might produce unwanted results.
Contributor guide
Assessment
This issue has not been assessed yet.