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.
This commit is contained in:
emizzle 2018-08-31 08:40:51 +10:00
parent b0fba12de7
commit 489f619c29

View File

@ -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")}