Remove cache on app update, fixes #342

This commit is contained in:
Jonas Schwabe
2016-10-19 11:35:32 +02:00
parent 0d76af70cb
commit 08d0fff557
2 changed files with 25 additions and 4 deletions

View File

@@ -45,8 +45,10 @@ var upgradeV0toV1 = function(config_v0) {
return config;
};
var upgrade = function(config) {
var upgrade = function(config, newAppVersion) {
var config_version = config.version ? config.version : 0;
if (newAppVersion)
config.lastMattermostVersion = newAppVersion;
switch (config_version) {
case 0:
return upgrade(upgradeV0toV1(config));