blockly-fluid 1.3.16 → 1.3.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.
package/index.js CHANGED
@@ -156,7 +156,14 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
156
156
  if (typeof field.options === "function") (field.options = field.options());
157
157
 
158
158
  dummy.appendField(new Blockly.FieldDropdown(...[
159
- ((Array.isArray(field.options)) ? field.options.map((option) => [option, option]) : Object.entries(field.options)).map(([name, text]) => [translate((typeof text === "function") ? text() : text), (typeof name === "function") ? name() : name]),
159
+ ((Array.isArray(field.options)) ? field.options.map((option) => [option, option]) : Object.entries(field.options)).map(([name, text]) => (
160
+ ((typeof name === "symbol") && (name.description.toLowerCase() === "separator"))
161
+ ? "separator"
162
+ : [
163
+ translate((typeof text === "function") ? text() : text),
164
+ (typeof name === "function") ? name() : name
165
+ ]
166
+ )),
160
167
  ...(field.validator) ? [field.validator] : []
161
168
  ]), token);
162
169
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blockly-fluid",
3
- "version": "1.3.16",
3
+ "version": "1.3.18",
4
4
  "description": "A flexible proxy wrapper for Blockly blocks.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/utils/dedent.js CHANGED
@@ -1,4 +1,6 @@
1
1
  module.exports = (text) => {
2
+ if (typeof text !== "string") return text;
3
+
2
4
  const lines = text.split("\n");
3
5
 
4
6
  const firstLine = lines.find((line) => line.trim().length > 0);