js: Fix two misphrased conditions.

This commit is contained in:
Max Schaefer
2017-08-22 15:25:03 +01:00
committed by Tim Abbott
parent 0dcbacdbc6
commit 4d0f304048
2 changed files with 2 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ exports.post_hotspot_as_read = function (hotspot_name) {
}; };
function place_icon(hotspot) { function place_icon(hotspot) {
if (!$(hotspot.location.element).length === 0) { if ($(hotspot.location.element).length !== 0) {
$('#hotspot_' + hotspot.name + '_icon').css('display', 'none'); $('#hotspot_' + hotspot.name + '_icon').css('display', 'none');
return; return;
} }

View File

@@ -71,7 +71,7 @@ $(function () {
var current_generation_key = 'i18next:' + page_params.server_generation; var current_generation_key = 'i18next:' + page_params.server_generation;
// remove cached translations of older versions. // remove cached translations of older versions.
translations.forEach(function (translation_key) { translations.forEach(function (translation_key) {
if (!translation_key.indexOf(current_generation_key) === 0) { if (translation_key.indexOf(current_generation_key) !== 0) {
localStorage.removeItem(translation_key); localStorage.removeItem(translation_key);
} }
}); });