chore: 将 Impeccable 更新到 4.8.0
This commit is contained in:
@@ -42,7 +42,10 @@
|
||||
|
||||
function createLiveBrowserSessionState({ prefix, storage, idFactory }) {
|
||||
if (!prefix) throw new Error('prefix required');
|
||||
const store = storage || root.localStorage;
|
||||
let store = storage;
|
||||
if (!store) {
|
||||
try { store = root.localStorage; } catch { store = null; /* storage denied */ }
|
||||
}
|
||||
const makeId = idFactory || function () { return randomId8(); };
|
||||
const sessionKey = prefix + '-session';
|
||||
const handledKey = sessionKey + '-handled';
|
||||
|
||||
Reference in New Issue
Block a user