From c3437382fb7b0683da3a68def7e4898fd513d15f Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 23 May 2017 11:22:32 +0200 Subject: [PATCH] Fix the release version in the what's new popup --- www/common/cryptpad-common.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 7a2264864..18ea8678e 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1325,14 +1325,16 @@ define([ var ver = arr[1]; if (!ver) { return; } var verArr = ver.split('.'); + verArr[2] = 0; if (verArr.length !== 3) { return; } var stored = localStorage[CRYPTPAD_VERSION] || '0.0.0'; var storedArr = stored.split('.'); + storedArr[2] = 0; var shouldUpdate = parseInt(verArr[0]) > parseInt(storedArr[0]) || (parseInt(verArr[0]) === parseInt(storedArr[0]) && parseInt(verArr[1]) > parseInt(storedArr[1])); if (!shouldUpdate) { return; } - common.alert(Messages._getKey('newVersion', [ver]), null, true); + common.alert(Messages._getKey('newVersion', [verArr.join('.')]), null, true); localStorage[CRYPTPAD_VERSION] = ver; };