A framework for building native applications using React
Support bare hosts. Add missing / between url (#26050)
Summary:
Fix for https://github.com/facebook/react-native/issues/26019 URL cannot handle "localhost" domain for base url. Also noticed another issue where `/` is not added between base URL and path if it is missing. Added fix for that too.
## Changelog
[Javascript] [Fixed] - `URL`: Bare Hosts are now supported.
Pull Request resolved: https://github.com/facebook/react-native/pull/26050
Test Plan:
* `new URL('home', 'http://localhost')` now returns `http://localhost/home` instead of throwing an error.
* `new URL('en-US/docs', 'https://developer.mozilla.org')` now returns `https://developer.mozilla.org/en-US/docs` and not `https://developer.mozilla.orgen-US/docs`.
Differential Revision: D17314137
Pulled By: cpojer
fbshipit-source-id: ef56c4f4032187a7efee32b28e2b3c935b6a2599 J
jeswinsimon committed
20ab946f34b1d9727ff08c733b2006e84fd79349
Parent: 314eba9
Committed by Facebook Github Bot <facebook-github-bot@users.noreply.github.com>
on 9/11/2019, 12:09:36 PM