Skip to content

Commit

Permalink
perf: ♻️ optimize mirror group tips
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Nov 7, 2023
1 parent cf9c82d commit 46defbf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 0 additions & 7 deletions electron/exposes/scrcpy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,6 @@ const mirrorGroup = async (serial, { open = 1, ...options } = {}) => {
title,
args,
exec: true,
}).catch((error) => {
console.warn(
'mirrorGroup.error',
error?.message
|| error?.cause?.message
|| `display-id-${displayId}: Open failed`,
)
})

results.push(promise)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,15 @@ export default {
})
console.log('handleMirror.res', res)
res.forEach((item) => {
if (item.status === 'rejected') {
throw item.reason || item
}
})
}
catch (error) {
console.warn(error.message)
console.warn('error.message', error.message)
if (error?.message || error?.cause?.message) {
this.$message.warning(error?.message || error?.cause?.message)
}
Expand Down

0 comments on commit 46defbf

Please sign in to comment.