Fix user upload bug

main
Mike Fix 7 years ago
parent 6d2e07737f
commit 517aca7c8f

@ -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,

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

Loading…
Cancel
Save