aboutsummaryrefslogtreecommitdiff
path: root/src/components/image_cropper
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-02-08 12:07:25 -0500
committertaehoon <th.dev91@gmail.com>2019-02-15 13:34:33 -0500
commitb458b2ae5f6c939781af16e32b50e61e1c1bf929 (patch)
treefb739ec724940cff7386ec7c806085cd5a3e98a9 /src/components/image_cropper
parentddfdaf3284c6790b1e973ca4ce469b07a2136ebc (diff)
Check if variable exists before using
Diffstat (limited to 'src/components/image_cropper')
-rw-r--r--src/components/image_cropper/image_cropper.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/image_cropper/image_cropper.js b/src/components/image_cropper/image_cropper.js
index c15ce9d8..d919827f 100644
--- a/src/components/image_cropper/image_cropper.js
+++ b/src/components/image_cropper/image_cropper.js
@@ -52,7 +52,9 @@ const ImageCropper = {
},
methods: {
destroy () {
- this.cropper.destroy()
+ if (this.cropper) {
+ this.cropper.destroy()
+ }
this.$refs.input.value = ''
this.dataUrl = undefined
},