mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
20ab946f34
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