feat: don't try to parse already-parsed JSON note
This commit is contained in:
parent
dec172576c
commit
f7c42992d8
1 changed files with 5 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue