mirror of
https://github.com/google/blockly.git
synced 2026-01-31 12:40:09 +01:00
Fix 'any' type in Block Factory.
This commit is contained in:
@@ -610,7 +610,7 @@ Blockly.Blocks['type_group_item'] = {
|
||||
|
||||
Blockly.Blocks['type_null'] = {
|
||||
// Null type.
|
||||
valueType: 'null',
|
||||
valueType: null,
|
||||
init: function() {
|
||||
this.setColour(230);
|
||||
this.appendDummyInput()
|
||||
|
||||
@@ -257,10 +257,10 @@ function getOptTypesFrom(block, name) {
|
||||
var types = getTypesFrom_(block, name);
|
||||
if (types.length == 0) {
|
||||
return '';
|
||||
} else if (types.length == 1) {
|
||||
return types[0];
|
||||
} else if (types.indexOf('null') != -1) {
|
||||
return 'null';
|
||||
} else if (types.length == 1) {
|
||||
return types[0];
|
||||
} else {
|
||||
return '[' + types.join(', ') + ']';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user