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: {
|
methods: {
|
||||||
destroy () {
|
destroy () {
|
||||||
|
if (this.cropper) {
|
||||||
this.cropper.destroy()
|
this.cropper.destroy()
|
||||||
|
}
|
||||||
this.$refs.input.value = ''
|
this.$refs.input.value = ''
|
||||||
this.dataUrl = undefined
|
this.dataUrl = undefined
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue