mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Enforcing non-empty names on value inputs and statement inputs. (#1054)
This commit is contained in:
committed by
GitHub
parent
2588ff8353
commit
25788a016e
@@ -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} */
|
||||
|
||||
Reference in New Issue
Block a user