mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
Fix NaN in if block (issue #109).
This commit is contained in:
@@ -92,8 +92,8 @@ Blockly.Blocks['controls_if'] = {
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
domToMutation: function(xmlElement) {
|
||||
this.elseifCount_ = parseInt(xmlElement.getAttribute('elseif'), 10);
|
||||
this.elseCount_ = parseInt(xmlElement.getAttribute('else'), 10);
|
||||
this.elseifCount_ = parseInt(xmlElement.getAttribute('elseif'), 10) || 0;
|
||||
this.elseCount_ = parseInt(xmlElement.getAttribute('else'), 10) || 0;
|
||||
for (var i = 1; i <= this.elseifCount_; i++) {
|
||||
this.appendValueInput('IF' + i)
|
||||
.setCheck('Boolean')
|
||||
|
||||
Reference in New Issue
Block a user