From 517aca7c8f31ed098578ca2cc6c5b0710e37e7af Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Sat, 14 Apr 2018 20:02:19 -0700 Subject: [PATCH] Fix user upload bug --- components/Editor.js | 2 +- components/ImagePicker.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Editor.js b/components/Editor.js index c6395a8..0804b94 100644 --- a/components/Editor.js +++ b/components/Editor.js @@ -177,7 +177,7 @@ class Editor extends React.Component { this.updateSetting('language', language.mime || language.mode) } - updateBackground({ photographer, ...changes }) { + updateBackground({ photographer, ...changes } = {}) { if (photographer) { this.setState(({ code = DEFAULT_CODE }) => ({ ...changes, diff --git a/components/ImagePicker.js b/components/ImagePicker.js index 681b934..b42b83f 100644 --- a/components/ImagePicker.js +++ b/components/ImagePicker.js @@ -89,7 +89,7 @@ export default class extends React.Component { }) } - selectImage(e, { photographer }) { + selectImage(e, { photographer } = {}) { const file = e.target ? e.target.files[0] : e return fileToDataURL(file).then(dataURL =>