Skip to content

Commit

Permalink
fix(notifier): add error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
beetcb committed Nov 10, 2021
1 parent c3d017b commit 063c38a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/utils/notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ const saveNotifications = (args: Array<any>) => {
}

const notify = async function(addtionalMessage: string) {
const [pushPlatform, pushToken] = sstore.get('notifier')
const notifyConf = sstore.get('notifier')
if (!notifyConf?.length) {
return
}
const [pushPlatform, pushToken] = notifyConf
const content = `${notifications.join(`<br>`)}<br>${
addtionalMessage.replace(/\n/g, '<br>').replace(/\s/g, '&nbsp')
}`
Expand Down

0 comments on commit 063c38a

Please sign in to comment.