blockly-fluid 1.3.4 → 1.3.6
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 +3 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -89,7 +89,7 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
|
|
|
89
89
|
if (input.variable) {
|
|
90
90
|
if (typeof input.variable === "function") (input.variable = input.variable());
|
|
91
91
|
|
|
92
|
-
const shadowVariableName = `shadow_variable_${name
|
|
92
|
+
const shadowVariableName = `shadow_variable_${name}`;
|
|
93
93
|
|
|
94
94
|
if (!Blocks[shadowVariableName]) {
|
|
95
95
|
Blocks[shadowVariableName] = {
|
|
@@ -320,6 +320,8 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
|
|
|
320
320
|
validator: (value) => {
|
|
321
321
|
if (!value) return "0";
|
|
322
322
|
if (/^-?\d*\.?\d*$/.test(value)) return value;
|
|
323
|
+
|
|
324
|
+
return "0";
|
|
323
325
|
}
|
|
324
326
|
}
|
|
325
327
|
},
|