diff options
Diffstat (limited to 'app/assets/javascripts/static_site_editor/services/image_service.js')
-rw-r--r-- | app/assets/javascripts/static_site_editor/services/image_service.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/static_site_editor/services/image_service.js b/app/assets/javascripts/static_site_editor/services/image_service.js index 25ab1084572..a9b85057e3d 100644 --- a/app/assets/javascripts/static_site_editor/services/image_service.js +++ b/app/assets/javascripts/static_site_editor/services/image_service.js @@ -1,8 +1,8 @@ -export const getBinary = file => { +export const getBinary = (file) => { return new Promise((resolve, reject) => { const reader = new FileReader(); reader.readAsDataURL(file); reader.onload = () => resolve(reader.result.split(',')[1]); - reader.onerror = error => reject(error); + reader.onerror = (error) => reject(error); }); }; |