Check if variable exists before using
This commit is contained in:
parent
ddfdaf3284
commit
b458b2ae5f
@ -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 New Issue
Block a user