blockly-fluid 1.3.28 → 1.3.30

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
@@ -82,7 +82,7 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
82
82
  output: true,
83
83
 
84
84
  generator: ({ DROPDOWN }) => [
85
- (input.check[0] === "Number") ? DROPDOWN : `"${DROPDOWN.replaceAll("\\", "\\\\").replaceAll(`"`, `\\"`)}"`,
85
+ (input.check.includes("Number") && ((Array.isArray(input.options)) ? input.options : Object.keys(input.options)).every((optionId) => !isNaN(optionId))) ? DROPDOWN : `"${DROPDOWN.replaceAll("\\", "\\\\").replaceAll(`"`, `\\"`)}"`,
86
86
  "atomic"
87
87
  ]
88
88
  };
@@ -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.28",
3
+ "version": "1.3.30",
4
4
  "description": "A flexible proxy wrapper for Blockly blocks.",
5
5
  "main": "index.js",
6
6
  "scripts": {