From cdcc52224aead1b9e0b322510d9cfc6aab22b83d Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 16 Mar 2020 16:46:09 +0100 Subject: [PATCH] Reload when the API version changes --- www/common/cryptpad-common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 565a67c42..fb28318e7 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -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;