fix error status in tutorial-builder
This commit is contained in:
		
							parent
							
								
									8d752e0430
								
							
						
					
					
						commit
						3a92a6a08c
					
				| @ -86,7 +86,7 @@ class BlocklyExample extends Component { | ||||
|       } | ||||
|       if(!this.props.task){ | ||||
|         // instruction can also display only one block, which does not necessarily
 | ||||
|         // have to be the initial block 
 | ||||
|         // have to be the initial block
 | ||||
|         xml = xml.replace('deletable="false"', 'deletable="true"'); | ||||
|       } | ||||
|       this.setState({xml: xml}); | ||||
| @ -100,6 +100,7 @@ class BlocklyExample extends Component { | ||||
|     var oldValue = this.state.checked; | ||||
|     this.setState({checked: value}); | ||||
|     if(oldValue !== value && !value){ | ||||
|       this.props.deleteError(this.props.index, 'xml'); | ||||
|       this.props.deleteProperty(this.props.index, 'xml'); | ||||
|     } | ||||
|   } | ||||
|  | ||||
| @ -48,7 +48,7 @@ class Id extends Component { | ||||
|     else if(this.props.error){ | ||||
|       this.props.deleteError(undefined, 'id'); | ||||
|     } | ||||
|     if(!this.props.value){ | ||||
|     if(!this.props.value || !Number.isInteger(this.props.value)){ | ||||
|       this.props.tutorialId(0+step); | ||||
|     } | ||||
|     else { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user