提交 0bfd1536 编写于 作者: Q qiang

fix(App): 修复 uni.getStorageInfo 获取部分 key 失去的问题 fixed #2577

上级 e14c3ef5
......@@ -185,7 +185,7 @@ export function getStorageInfo () {
let currentSize = 0
for (let index = 0; index < length; index++) {
const key = plus.storage.key(index)
if (key !== STORAGE_KEYS && key.indexOf(STORAGE_DATA_TYPE) + STORAGE_DATA_TYPE.length !== key.length) {
if (key !== STORAGE_KEYS && (key.indexOf(STORAGE_DATA_TYPE) < 0 || key.indexOf(STORAGE_DATA_TYPE) + STORAGE_DATA_TYPE.length !== key.length)) {
const value = plus.storage.getItem(key)
currentSize += key.length + value.length
keys.push(key)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册