Enforcing non-empty names on value inputs and statement inputs. (#1054)

This commit is contained in:
Andrew n marshall
2017-04-19 11:03:16 -07:00
committed by GitHub
parent 2588ff8353
commit 25788a016e

View File

@@ -41,6 +41,10 @@ goog.require('goog.asserts');
* @constructor
*/
Blockly.Input = function(type, name, block, connection) {
if (!name &&
(type == Blockly.INPUT_VALUE || type == Blockly.NEXT_STATEMENT)) {
throw "Value inputs and statement inputs must have non-empty name.";
}
/** @type {number} */
this.type = type;
/** @type {string} */