diff --git a/.eslintrc.js b/.eslintrc.js index 32842d3c52..800f9a4f5d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,12 +10,6 @@ module.exports = { plugins: [ 'html' ], - globals: { - 'FileReader': false, - 'Element': false, - 'FormData': false, - 'XMLHttpRequest': false - }, // add your custom rules here rules: { // allow paren-less arrow functions diff --git a/src/components/image_cropper/image_cropper.js b/src/components/image_cropper/image_cropper.js index d919827f1a..b258024014 100644 --- a/src/components/image_cropper/image_cropper.js +++ b/src/components/image_cropper/image_cropper.js @@ -5,7 +5,7 @@ import 'cropperjs/dist/cropper.css' const ImageCropper = { props: { trigger: { - type: [String, Element], + type: [String, window.Element], required: true }, cropperOptions: { @@ -74,7 +74,7 @@ const ImageCropper = { readFile () { const fileInput = this.$refs.input if (fileInput.files != null && fileInput.files[0] != null) { - let reader = new FileReader() + let reader = new window.FileReader() reader.onload = (e) => { this.dataUrl = e.target.result }