blockly-fluid 1.4.31 → 1.4.32

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 +10 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -258,10 +258,19 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
258
258
 
259
259
  if (!languageGenerator.uniqueVariable) {
260
260
  languageGenerator.uniqueVariable = (variable) => {
261
- return languageGenerator.nameDB_.getDistinctName(
261
+ if (variable) return languageGenerator.nameDB_.getDistinctName(
262
262
  variable,
263
263
  Blockly.VARIABLE_CATEGORY_NAME
264
264
  );
265
+
266
+ return new Proxy({}, {
267
+ get(_, property) {
268
+ return languageGenerator.nameDB_.getDistinctName(
269
+ property,
270
+ Blockly.VARIABLE_CATEGORY_NAME
271
+ );
272
+ }
273
+ });
265
274
  };
266
275
  };
267
276
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blockly-fluid",
3
- "version": "1.4.31",
3
+ "version": "1.4.32",
4
4
  "description": "A flexible proxy wrapper for Blockly blocks.",
5
5
  "main": "index.js",
6
6
  "scripts": {