Merge pull request #3960 from kchadha/cloud-var-modal

Do not show cloud variable option in list modal.
This commit is contained in:
Karishma Chadha authored and GitHub committed 2018-12-06 10:53:44 -05:00
commit 62d8aad125
1 file changed
+2 -1
+2 -1
View File
@@ -386,6 +386,7 @@ class Blocks extends React.Component {
optVarType !== this.ScratchBlocks.BROADCAST_MESSAGE_VARIABLE_TYPE &&
p.prompt.title !== this.ScratchBlocks.Msg.RENAME_VARIABLE_MODAL_TITLE &&
p.prompt.title !== this.ScratchBlocks.Msg.RENAME_LIST_MODAL_TITLE;
p.prompt.showCloudOption = (optVarType === this.ScratchBlocks.SCALAR_VARIABLE_TYPE) && this.props.canUseCloud;
this.setState(p);
}
handleConnectionModalStart (extensionId) {
@@ -462,7 +463,7 @@ class Blocks extends React.Component {
isStage={vm.runtime.getEditingTarget().isStage}
label={this.state.prompt.message}
placeholder={this.state.prompt.defaultValue}
showCloudOption={canUseCloud}
showCloudOption={this.state.prompt.showCloudOption}
showVariableOptions={this.state.prompt.showVariableOptions}
title={this.state.prompt.title}
vm={vm}