Skip to content

Commit

Permalink
Fix initial update bug
Browse files Browse the repository at this point in the history
  • Loading branch information
abuturla committed Feb 16, 2018
1 parent 84e9614 commit 2688047
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/widget/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ const setFlags = (content) => {
flags.isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
};

//.view
//.url
const render = (content) => {
setFlags(content);
const displayIniFrame = flags.isNotCP && flags.shouldOpenInApp;
const openWindow = flags.isNotCP && !flags.shouldOpenInApp;
const displaySuccessMessage = flags.isWeb && !flags.isLiveMode && content.url;
const displaySuccessMessage = content.url && flags.isWeb && !flags.isLiveMode;

if(displayIniFrame){
renderiFrame({url: content.url, isIOS: flags.isIOS});
Expand Down Expand Up @@ -103,7 +102,6 @@ buildfire.datastore.get((err, result) => {

const { content } = result.data;

setFlags(content);
render(content);

buildfire.spinner.hide();
Expand Down

0 comments on commit 2688047

Please sign in to comment.