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) {
|
||||
return;
|
||||
}
|
||||
var ver = req.responseText.trim();
|
||||
if (!currentVersion) {
|
||||
currentVersion = req.responseText.trim();
|
||||
currentVersion = ver;
|
||||
}
|
||||
|
||||
if (req.responseText !== latestVersion) {
|
||||
latestVersion = req.responseText.trim();
|
||||
if (ver !== latestVersion) {
|
||||
latestVersion = ver;
|
||||
if (module.exports.hasNewVersion()) {
|
||||
console.log("Current=%s Latest=%s", currentVersion, latestVersion);
|
||||
listener(currentVersion, latestVersion);
|
||||
|
Loading…
Reference in New Issue
Block a user