From 1d85149a975fd2539b7d5ac43fa7eef6ba201066 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Wed, 22 Aug 2018 12:20:29 -0700 Subject: [PATCH] fix api.image call logic --- components/Editor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/Editor.js b/components/Editor.js index 096bc26..ed89d18 100644 --- a/components/Editor.js +++ b/components/Editor.js @@ -125,10 +125,10 @@ class Editor extends React.Component { // if safari, get image from api const isPNG = format !== 'svg' if ( - (this.props.api.image, + this.props.api.image && navigator.userAgent.indexOf('Safari') !== -1 && - navigator.userAgent.indexOf('Chrome') === -1 && - isPNG) + navigator.userAgent.indexOf('Chrome') === -1 && + isPNG ) { const encodedState = serializeState(this.state) return this.props.api.image(encodedState)