blockly-fluid 1.0.16 → 1.0.18

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 +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -107,7 +107,7 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
107
107
  this.setOutput(true, (output === true) ? null : (([String, Number, Boolean, Array, Object].includes(output)) ? output.name : output));
108
108
  };
109
109
 
110
- this.setColour((color != null) ? ((typeof color === "function") ? color() : color) : (Blockly.getMainWorkspace().getToolbox().contents_.find((category) => category.toolboxItemDef_.contents?.some((block) => block.type === name))?.toolboxItemDef_?.colour || "#000000"));
110
+ this.setColour((color != null) ? ((typeof color === "function") ? color() : color) : (((toolbox) => toolbox.contents_ || toolbox.contents.values())(Blockly.getMainWorkspace().getToolbox()).find((category) => category.toolboxItemDef_.contents?.some((block) => block.type === name))?.toolboxItemDef_?.colour || "#000000"));
111
111
  this.setInputsInline((typeof inline === "function") ? inline() : inline);
112
112
  this.setDeletable((typeof deletable === "function") ? deletable() : deletable);
113
113
  this.setTooltip(translate((typeof tooltip === "function") ? tooltip() : tooltip));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blockly-fluid",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "A flexible proxy wrapper for Blockly blocks.",
5
5
  "main": "index.js",
6
6
  "scripts": {