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 committed by Pascal Precht
parent 859d78eb41
commit c5105dd6e4
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 1 additions and 1 deletions

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