Skip to content

Commit

Permalink
feat: async handleEventSend
Browse files Browse the repository at this point in the history
  • Loading branch information
wasita mahaphanit committed Jan 15, 2020
1 parent 2b1e56c commit 2f26fa0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions public/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,10 @@ const setUpPort = async () => {
}
}

const handleEventSend = (code) => {
const handleEventSend = async (code) => {
if (!portAvailable && !SKIP_SENDING_DEV) {
let message = "Event Marker not connected"
log.warn(message)

let buttons = ["Quit", "Retry"]
if (process.env.ELECTRON_START_URL) {
buttons.push("Continue Anyway")
Expand All @@ -132,9 +131,8 @@ const handleEventSend = (code) => {
SKIP_SENDING_DEV = true
}
})

} else if (!SKIP_SENDING_DEV) {
sendToPort(triggerPort, code)
await sendToPort(triggerPort, code)
}
}

Expand Down

0 comments on commit 2f26fa0

Please sign in to comment.