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 =>