Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix updatenotification #3281

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ _This release is scheduled to be released on 2024-01-01._
- Fix #3256 filter out bad results from rrule.between
- Fix calendar events sometimes not respecting deleted events (#3250)
- Fix electron loadurl locally on Windows when address "0.0.0.0" (#2550)
- Fix updatanotification (update_helper.js): catch error if reponse is not an JSON format (check PM2)

## [2.25.0] - 2023-10-01

Expand Down
10 changes: 8 additions & 2 deletions modules/default/updatenotification/update_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,14 @@ class Updater {
resolve(null);
return;
}
let result = JSON.parse(std);
resolve(result);
try {
let result = JSON.parse(std);
resolve(result);
} catch (e) {
Log.error("updatenotification: [PM2] can't GetList!");
Log.debug("updatenotification: [PM2] GetList is not an JSON format", e);
resolve(null);
}
});
});
}
Expand Down