remove 'delete's

main
Mike Fix 6 years ago committed by Michael Fix
parent 36b582cc60
commit ae9dde35c5

@ -96,8 +96,6 @@ class Editor extends React.Component {
...newState.theme, ...newState.theme,
highlights: newState.highlights highlights: newState.highlights
} }
delete newState.highlights
} }
// Makes sure the slash in 'application/X' is decoded // Makes sure the slash in 'application/X' is decoded
@ -105,7 +103,7 @@ class Editor extends React.Component {
newState.language = unescapeHtml(newState.language) newState.language = unescapeHtml(newState.language)
} }
this.updateState(newState) this.updateState(omit(newState, ['highlights']))
this.isSafari = this.isSafari =
window.navigator && window.navigator &&
@ -145,9 +143,7 @@ class Editor extends React.Component {
highlights: this.state.theme.highlights highlights: this.state.theme.highlights
} }
delete state.themes const encodedState = serializeState(omit(state, ['themes']))
const encodedState = serializeState(state)
return this.context.image(encodedState) return this.context.image(encodedState)
} }

Loading…
Cancel
Save