NodeJS: Global name not working on Globals

Wappler 5.2.4
MacOS
NodeJS

In Globals (global.json) this doesn’t work:

The restrict__ comes out as false, when it should be true

Looking forward a fast fix as it’s impacting a permission system I made

It’s not a bug. You create 2 variables each time, the Name property is for the local variable within the current scope and Global Name is the variable in the global scope. The group exec creates a scope and the repeat also creates a scope. So the first Set Value sets the variable in the group scope and global scope. The Set Value in the repeat sets the variable in the repeat scope and updates the one in the global scope. The last Set Value reads the restrict_ value and gets the value from the group scope since that is where you are located at that moment.

Improved in Wappler 5.3.2

This topic was automatically closed after 47 hours. New replies are no longer allowed.