-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Closed
Labels
F-reactFramework - ReactFramework - ReactV-4Version - 4.xVersion - 4.xbugSomething isn't workingSomething isn't working
Description
请先确认
- 我已搜索并确定这个提交不是重复的
Taro 版本
v4
相关平台
- 所有平台
- Web 端(H5)
- 移动端(React-Native)
- 鸿蒙(Harmony)
- 鸿蒙容器(Harmony Hybrid)
- ASCF 元服务
- 快应用(QuickApp)
- 所有小程序
- 微信小程序
- 企业微信小程序
- 京东小程序
- 百度小程序
- 支付宝小程序
- 支付宝 IOT 小程序
- 头条小程序
- QQ 小程序
- 钉钉小程序
- 飞书小程序
- 快手小程序
小程序基础库版本
No response
使用框架
React
问题描述
taro/packages/taro-runtime/src/bom/URL.ts
Line 209 in 0dace86
| result.origin = result.protocol + '//' + result.hostname |
导致 new URL('/path', 'http://localhost:1234/') 返回的结果不正确
复现链接
taro/packages/taro-runtime/src/bom/URL.ts
Line 209 in 0dace86
| result.origin = result.protocol + '//' + result.hostname |
复现步骤
const u = new URL('/path', 'http://localhost:1234/')
u.toString() // -> http://localhost/path环境信息
👽 Taro v4.1.2贡献代码
- 我愿意修复这个错误
Metadata
Metadata
Assignees
Labels
F-reactFramework - ReactFramework - ReactV-4Version - 4.xVersion - 4.xbugSomething isn't workingSomething isn't working