feat: don't try to parse already-parsed JSON note

This commit is contained in:
siiky 2025-07-02 12:12:45 +01:00
parent dec172576c
commit f7c42992d8

View file

@ -24,7 +24,11 @@ const DETAIL_TEMPLATE = {
}
function parseEventNote(event) {
return _.set('note', JSON.parse(event.note), event)
return _.update(
'note',
note => (typeof note === 'string' ? JSON.parse(note) : note),
event,
)
}
function checkPing(device) {