If no home and there are some cities, load first city
parent
992378f166
commit
b2161ce37a
|
@ -167,6 +167,12 @@ app.controller('WeatherController', ['$scope', '$interval', '$timeout', '$compil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If no home found, load first city found
|
||||||
|
if ($scope.cities.length > 0) {
|
||||||
|
$scope.loadCity($scope.cities[0]);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
function (r) {
|
function (r) {
|
||||||
$scope.fatalError();
|
$scope.fatalError();
|
||||||
|
|
Loading…
Reference in New Issue