mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Split out response text to its own var to prevent trim() messing up comparisons
This commit is contained in:
parent
5eed734325
commit
4628cf82a7
@ -29,12 +29,13 @@ module.exports = {
|
|||||||
if (!req.responseText) {
|
if (!req.responseText) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
var ver = req.responseText.trim();
|
||||||
if (!currentVersion) {
|
if (!currentVersion) {
|
||||||
currentVersion = req.responseText.trim();
|
currentVersion = ver;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req.responseText !== latestVersion) {
|
if (ver !== latestVersion) {
|
||||||
latestVersion = req.responseText.trim();
|
latestVersion = ver;
|
||||||
if (module.exports.hasNewVersion()) {
|
if (module.exports.hasNewVersion()) {
|
||||||
console.log("Current=%s Latest=%s", currentVersion, latestVersion);
|
console.log("Current=%s Latest=%s", currentVersion, latestVersion);
|
||||||
listener(currentVersion, latestVersion);
|
listener(currentVersion, latestVersion);
|
||||||
|
Loading…
Reference in New Issue
Block a user