Fix error if malformed JSON on the watch already (eg. from going through a tutorial)

master
Gordon Williams 2020-07-09 15:04:08 +01:00
parent c99e4e53a8
commit be3269ccc2
1 changed files with 1 additions and 0 deletions

View File

@ -425,6 +425,7 @@ function updateApp(app) {
return getInstalledApps().then(() => {
// a = from appid.info, app = from apps.json
let remove = appsInstalled.find(a => a.id === app.id);
if (remove.files===undefined) remove.files="";
// no need to remove files which will be overwritten anyway
remove.files = remove.files.split(',')
.filter(f => f !== app.id + '.info')