forked from AkkomaGang/akkoma-fe
Check if variable exists before using
This commit is contained in:
parent
ddfdaf3284
commit
b458b2ae5f
1 changed files with 3 additions and 1 deletions
|
@ -52,7 +52,9 @@ const ImageCropper = {
|
|||
},
|
||||
methods: {
|
||||
destroy () {
|
||||
this.cropper.destroy()
|
||||
if (this.cropper) {
|
||||
this.cropper.destroy()
|
||||
}
|
||||
this.$refs.input.value = ''
|
||||
this.dataUrl = undefined
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue