Skip to content

Commit

Permalink
fix: undefined decode event payloads
Browse files Browse the repository at this point in the history
See #75
  • Loading branch information
gruhn committed Oct 29, 2018
1 parent 8170bb1 commit 465a4cf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/QrcodeReader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,10 @@ export default {
},
startScanning () {
const detectHandler = promise => {
this.onDetect(async () => {
const result = await promise
return { source: 'stream', ...result }
})
const detectHandler = result => {
this.onDetect(
Promise.resolve({ source: 'stream', ...result })
)
}
keepScanning(this.cameraInstance, {
Expand Down

0 comments on commit 465a4cf

Please sign in to comment.