Browse Source

无jira任务,cache.getItem默认值返回null,不要undefined,同原来的结果

research/test
guyi 1 year ago
parent
commit
efcd83a00f
  1. 2
      packages/fineui/src/core/structure/cache.js

2
packages/fineui/src/core/structure/cache.js

@ -13,7 +13,7 @@ export const Cache = {
return Cache._getKeyPrefix() + (key || ""); return Cache._getKeyPrefix() + (key || "");
}, },
getItem: function (key, opt = {}) { getItem: function (key, opt = {}) {
const { defaultValue, typeConversion } = opt; const { defaultValue = null, typeConversion } = opt;
const storageKey = Cache._generateKey(key); const storageKey = Cache._generateKey(key);
let value = localStorage.getItem(storageKey); let value = localStorage.getItem(storageKey);

Loading…
Cancel
Save