Reload when the API version changes
parent
0074824a0a
commit
cdcc52224a
www/common
|
@ -1712,9 +1712,9 @@ define([
|
|||
var stored = currentVersion || '0.0.0';
|
||||
var storedArr = stored.split('.');
|
||||
storedArr[2] = 0;
|
||||
var shouldUpdate = parseInt(verArr[0]) > parseInt(storedArr[0]) ||
|
||||
var shouldUpdate = parseInt(verArr[0]) !== parseInt(storedArr[0]) ||
|
||||
(parseInt(verArr[0]) === parseInt(storedArr[0]) &&
|
||||
parseInt(verArr[1]) > parseInt(storedArr[1]));
|
||||
parseInt(verArr[1]) !== parseInt(storedArr[1]));
|
||||
if (!shouldUpdate) { return; }
|
||||
currentVersion = ver;
|
||||
localStorage[CRYPTPAD_VERSION] = ver;
|
||||
|
|
Loading…
Reference in New Issue