ardublockly icon indicating copy to clipboard operation
ardublockly copied to clipboard

undefined type forgotten in types.js

Open SebCanet opened this issue 8 years ago • 1 comments

First thanks a lot for your wonderful type script !!! I used it in Blockly@rduino and it works fine. But in 'types.js', line 168 I added a code for testing if nextblock.connection is null

Blockly.Types.getChildBlockType = function(block) {
  var blockType = null;
  var nextBlock = block;
  // Only checks first input block, so it decides the type. Incoherences amongst
  // multiple inputs dealt at a per-block level with their own block warnings
  while (nextBlock && (nextBlock.getBlockType === undefined) &&
         (nextBlock.inputList.length > 0) && (nextBlock.inputList[0].connection != null)) {
    nextBlock = nextBlock.inputList[0].connection.targetBlock();
  }

I d'ont know if you prefer...

SebCanet avatar Aug 19 '16 17:08 SebCanet

Thanks a lot for the additional check! I will be unavailable for a few weeks from tomorrow and wouldn't want to rush it, but I'll definitely have a proper look at this one once I'm back.

carlosperate avatar Aug 24 '16 22:08 carlosperate