fix: log an error when images cannot be decoded (#1849)
This commit is contained in:
parent
5a9e5ae8bc
commit
08c021bc56
|
@ -37,9 +37,11 @@
|
|||
|
||||
export default {
|
||||
async oncreate () {
|
||||
const { node } = this.refs
|
||||
try {
|
||||
await decodeImage(this.refs.node)
|
||||
await decodeImage(node)
|
||||
} catch (e) {
|
||||
console.error('Image decode error', node && node.src, e)
|
||||
this.set({ error: true })
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue