Cache: Fix migration check (#4122)

This commit is contained in:
Alexander Zinchuk 2023-12-23 22:15:31 +01:00
parent 449c241201
commit cc1fb8d1cd

View File

@ -206,7 +206,7 @@ function unsafeMigrateCache(cached: GlobalState, initialState: GlobalState) {
}
// Clear old color storage to optimize cache size
if (untypedCached.appConfig.peerColors) {
if (untypedCached?.appConfig?.peerColors) {
untypedCached.appConfig.peerColors = undefined;
untypedCached.appConfig.darkPeerColors = undefined;
}