HaxeFoundation / HaxeFoundation/haxe

[js] Browser.supported false positive check on react native

Open
#9,118 4 comments 0 reactions 1 assignee Claimed by @haxiomic View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.