From c5105dd6e4e60b2a7451f88fcb6c952f29a077b3 Mon Sep 17 00:00:00 2001 From: emizzle Date: Fri, 31 Aug 2018 08:40:51 +1000 Subject: [PATCH] Hide deploy button when not successfully compiled Bug that cropped up in the refactor. Deploy button was showing if there warnings, but no errors. Have changed this to only show the deploy button if there is a compilation result (returned from the api) instead. --- embark-ui/src/containers/FiddleContainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embark-ui/src/containers/FiddleContainer.js b/embark-ui/src/containers/FiddleContainer.js index 885a3d48..5061e787 100644 --- a/embark-ui/src/containers/FiddleContainer.js +++ b/embark-ui/src/containers/FiddleContainer.js @@ -187,7 +187,7 @@ class FiddleContainer extends Component { showFatalFiddleDeploy={Boolean(fiddleDeployError)} onDeployClick={(e) => this._onDeployClick(e)} isVisible={Boolean(fatalError || hasResult || loading)} - showDeploy={hasResult && !errors.length} + showDeploy={hasResult && Boolean(fiddle.compilationResult)} onWarningsClick={(e) => this._onErrorSummaryClick(e, "errorsCardRef")} onErrorsClick={(e) => this._onErrorSummaryClick(e, "warningsCardRef")} onFatalClick={(e) => this._onErrorSummaryClick(e, "fatalCardRef")}