diff options
Diffstat (limited to 'app/assets/javascripts/profile/gl_crop.js')
-rw-r--r-- | app/assets/javascripts/profile/gl_crop.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/profile/gl_crop.js b/app/assets/javascripts/profile/gl_crop.js index afc78cbe78a..722f7d467a2 100644 --- a/app/assets/javascripts/profile/gl_crop.js +++ b/app/assets/javascripts/profile/gl_crop.js @@ -114,7 +114,9 @@ import { loadCSSFile } from '../lib/utils/css_utils'; } onModalHide() { - return this.modalCropImg.attr('src', '').cropper('destroy'); + this.modalCropImg.attr('src', '').cropper('destroy'); + const modalElement = document.querySelector('.modal-profile-crop'); + if (modalElement) modalElement.remove(); } onUploadImageBtnClick(e) { |