single quotes. better logic.
This commit is contained in:
Andrew n marshall
2017-04-19 14:38:22 -07:00
committed by GitHub
parent 25788a016e
commit 1c45724e37

View File

@@ -41,9 +41,8 @@ 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.";
if (type != Blockly.DUMMY_INPUT && !name) {
throw 'Value inputs and statement inputs must have non-empty name.';
}
/** @type {number} */
this.type = type;