From 2688047b0dea751c6243bb0c40866e96d2f00117 Mon Sep 17 00:00:00 2001 From: attila buturla Date: Thu, 15 Feb 2018 16:40:03 -0800 Subject: [PATCH] Fix initial update bug --- src/widget/widget.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/widget/widget.js b/src/widget/widget.js index f85622b..3a75cd4 100644 --- a/src/widget/widget.js +++ b/src/widget/widget.js @@ -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}); @@ -103,7 +102,6 @@ buildfire.datastore.get((err, result) => { const { content } = result.data; - setFlags(content); render(content); buildfire.spinner.hide();