Browse Source

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

Merge in VISUAL/fineui from ~GUYI/fineui:master to master

* commit 'efcd83a00f4cf53d9a3a5ee3dee10baabbc28c63':
  无jira任务,cache.getItem默认值返回null,不要undefined,同原来的结果
research/test
Guyi-顾翌 1 year ago
parent
commit
0e154ea56c
  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 || "");
},
getItem: function (key, opt = {}) {
const { defaultValue, typeConversion } = opt;
const { defaultValue = null, typeConversion } = opt;
const storageKey = Cache._generateKey(key);
let value = localStorage.getItem(storageKey);

Loading…
Cancel
Save