-
Notifications
You must be signed in to change notification settings - Fork 390
Open
Description
问题描述
在 @mpxjs/core 从 2.10.16 升级到 2.10.18 后,RN iOS 端偶发崩溃:
URIError: Malformed decodeURI input
堆栈核心在 decodeURIComponent。
不确定是否是下方代码改动引起
const decodedQuery = {}
const rawQuery = props.route.params || {}
if (isObject(rawQuery)) {
for (const key in rawQuery) {
decodedQuery[key] = decodeURIComponent(rawQuery[key])
}
}
proxy.callHook(ONLOAD, [rawQuery, decodedQuery])
最简复现demo
业务通过 parseAppProps 传入 initialRouteName / initialParams。
即使 initialRouteName 本身不带 query,route.params 仍可能来自 initialParams 或后续导航 params。
当任一 param 含非法 URI 片段(如裸 %、不完整 %E4)时,会抛 URIError,页面初始化失败。
问题为“偶发”,取决于参数内容。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels