mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-05 20:32:27 +00:00
Restore comment bootstrap and guard admin cache hydration
This commit is contained in:
1 parent
4a70adcd1c
commit
5d31366c79
5 files changed
+284
-8
No files matched your search
+9
-1
@@ -147,7 +147,15 @@ class AccessControl {
|
||||
|
||||
_hydrateFromCache() {
|
||||
this._hydratedFromCache = false;
|
||||
const cachedState = readCachedAdminState();
|
||||
let cachedState = null;
|
||||
try {
|
||||
cachedState = readCachedAdminState();
|
||||
} catch (error) {
|
||||
if (error && error.name === "ReferenceError") {
|
||||
return;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
if (cachedState) {
|
||||
this._applyState(cachedState, { markLoaded: false });
|
||||
this._hydratedFromCache = true;
|
||||
|
||||
Reference in new issue
Block a user