Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/weather.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAlfred Egger <alfred.egger@gmx.at>2019-05-22 17:05:10 +0300
committerAlfred Egger <alfred.egger@gmx.at>2019-05-22 17:05:10 +0300
commit91064d5acfd1ff77f4c4ad773656c78355e4d57e (patch)
tree7ac7f93802e7d9afe4317161b6c1b1a90bb874a2 /js
parent4523922f81b455c7c6b9e5c308b1c49e39443275 (diff)
Fix Javascript problems
Diffstat (limited to 'js')
-rw-r--r--js/app.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/app.js b/js/app.js
index 969b0d8..34e6b6f 100644
--- a/js/app.js
+++ b/js/app.js
@@ -14,7 +14,7 @@ var app = angular.module('Weather', []);
var g_error500 = t('weather', 'Fatal Error: please check your nextcloud.log and send a bug report here: https://github.com/nextcloud/weather/issues');
function undef (obj) {
- return typeof obj === undefined || obj === undefined;
+ return typeof obj === 'undefined' || obj === undefined;
}
function emptyStr (obj) {
@@ -127,7 +127,7 @@ app.controller('WeatherController', ['$scope', '$interval', '$timeout', '$compil
if (!undef(r.data['home'])) {
$scope.homeCity = r.data['home'];
if ($scope.homeCity) {
- for (i = 0; i < $scope.cities.length; i++) {
+ for (var i = 0; i < $scope.cities.length; i++) {
if ($scope.cities[i].id == $scope.homeCity) {
$scope.loadCity($scope.cities[i]);
return;
@@ -183,7 +183,7 @@ app.controller('WeatherController', ['$scope', '$interval', '$timeout', '$compil
else if ($scope.currentCity.wind.deg > 244 && $scope.currentCity.wind.deg < 289) {
$scope.currentCity.wind.desc = t('weather', 'West');
}
- else if ($scope.currentCity.wind.deg > 288 && $scope.currentCity.wind.deg < 334) {
+ else if ($scope.currentCity.wind.deg > 288) {
$scope.currentCity.wind.desc = t('weather', 'North-West');
}
$scope.cityLoadError = '';