1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

fix(state): check validity of state (#4609)

This commit is contained in:
Chaim Lev-Ari 2021-01-19 00:10:08 +02:00 committed by GitHub
parent 832cafc933
commit 20d4341170
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -179,7 +179,7 @@ angular.module('portainer.app').factory('StateManager', [
}
var applicationState = LocalStorage.getApplicationState();
if (applicationState) {
if (applicationState && applicationState.validity) {
var now = moment().unix();
var cacheValidity = now - applicationState.validity;
if (cacheValidity > APPLICATION_CACHE_VALIDITY) {