fix(storage): align sync storage APIs with WeChat behavior#190
Merged
fix(storage): align sync storage APIs with WeChat behavior#190
Conversation
dos1in
reviewed
Apr 3, 2026
dos1in
reviewed
Apr 3, 2026
Contributor
Author
|
进一步排查发现 removeStorageSync 的根因在 JS SDK 层——使用了 rest 参数 (...opts) 导致单个 key 被包装为数组,Android 端 optString 解析得到 ["key"] 而非 key,静默删除失败。已将 JS SDK 改为普通参数 (opts),并对齐 iOS/Harmony 端为字符串解析,与 getStorageSync 保持一致。 |
Member
|
需要解决下代码冲突 |
d187b02 to
dd483cb
Compare
…t type support Return empty string instead of null/nil when key doesn't exist, matching WeChat official behavior. Applied to iOS and Android. Also add JSONObject/JSONArray support in Android storage set/get and getStorageSync return to preserve structured data types.
dd483cb to
18d84a9
Compare
Contributor
Author
done |
lbb00
added a commit
to EchoTechFE/dimina
that referenced
this pull request
Apr 7, 2026
* fix(ios): align storage sync bridge params * fix(storage): align getStorageSync with WeChat behavior and add Object type support Return empty string instead of null/nil when key doesn't exist, matching WeChat official behavior. Applied to iOS and Android. Also add JSONObject/JSONArray support in Android storage set/get and getStorageSync return to preserve structured data types.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复 iOS 和 Android 端 Storage 同步接口的参数解析逻辑。对齐微信官方的文档
Fixes #164