handle missing weather libs per https://github.com/espruino/BangleApps/pull/3700\#discussion_r1898658072
parent
4a93991fc6
commit
9dec0643e1
|
|
@ -60,7 +60,12 @@ layout.update();
|
||||||
//support functions
|
//support functions
|
||||||
|
|
||||||
function getWeather() {
|
function getWeather() {
|
||||||
var weather = require("Storage").readJSON('weather.json', 1).weather;
|
var weather = {};
|
||||||
|
try {
|
||||||
|
weather = require("Storage").readJSON('weather.json', 1).weather;
|
||||||
|
} catch(e) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
return weather;
|
return weather;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue