fix api.image call logic

main
Mike Fix 6 years ago
parent fa983f6fbe
commit 1d85149a97

@ -125,10 +125,10 @@ class Editor extends React.Component {
// if safari, get image from api // if safari, get image from api
const isPNG = format !== 'svg' const isPNG = format !== 'svg'
if ( if (
(this.props.api.image, this.props.api.image &&
navigator.userAgent.indexOf('Safari') !== -1 && navigator.userAgent.indexOf('Safari') !== -1 &&
navigator.userAgent.indexOf('Chrome') === -1 && navigator.userAgent.indexOf('Chrome') === -1 &&
isPNG) isPNG
) { ) {
const encodedState = serializeState(this.state) const encodedState = serializeState(this.state)
return this.props.api.image(encodedState) return this.props.api.image(encodedState)

Loading…
Cancel
Save