blockly-fluid 1.3.29 → 1.3.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -167,7 +167,7 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
167
167
  ...(field.validator) ? [field.validator] : []
168
168
  ]), token);
169
169
 
170
- if (field.default) this.setFieldValue((typeof field.default === "function") ? field.default() : field.default, token);
170
+ if (field.default) this.setFieldValue(((typeof field.default === "function") ? field.default() : field.default).toString(), token);
171
171
 
172
172
  break;
173
173
  case "variable":
@@ -201,7 +201,7 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
201
201
 
202
202
  this.setPreviousStatement(false);
203
203
  this.setNextStatement(false);
204
- this.setOutput(true, (output === true) ? null : (([String, Number, Boolean, Array, Object].includes(output)) ? output.name : output));
204
+ this.setOutput(true, (output === true) ? null : (([String, Number, Boolean, Array, Object].includes(output)) ? output.name : ((Array.isArray(output)) ? output.map((type) => ([String, Number, Boolean, Array, Object].includes(type)) ? type.name : type) : output)));
205
205
  };
206
206
 
207
207
  this.setColour(color);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blockly-fluid",
3
- "version": "1.3.29",
3
+ "version": "1.3.31",
4
4
  "description": "A flexible proxy wrapper for Blockly blocks.",
5
5
  "main": "index.js",
6
6
  "scripts": {