Wappler Version : 5.2.3
Operating System : Windows 11
Server Model: node.js
Database Type: Mariadb
Hosting Type: Docker/Digital Ocean
Expected behavior
Starting today several Library Actions in my app that relied on updating variables within repeats leveraging their global names stopped working. The variables outside of the repeat stopped getting updated (these were features that had been in production for months). Note: the exact same code when copied from a Library action to an API action works fine.
Today I did two things: 1) updated Wappler to 5.2.3 and 2) updated node.js to the most recent version. I’m not sure which of these actions caused the issue.
Actual behavior
Variables outside of the repeat do not get updated when referencing the global name. I am able to recreate with a simple example:
How to reproduce
API Action:
The query simply pulls five records to iterate through
the variable inside the repeat is named ‘counter’ for both local and global names
The output is as expected (see below)
The Library action is set up the same way. But the inner variable never updates and is not written to the variable ‘outerCounter’ outside the repeat
json output:
{
“repeat”: [
{
“counter”: 1
},
{
“counter”: 2
},
{
“counter”: 3
},
{
“counter”: 4
},
{
“counter”: 5
}
],
“endCounter”: 5,
“exec”: {
“repeat”: [
{
“innerCounter”: 1
},
{
“innerCounter”: 1
},
{
“innerCounter”: 1
},
{
“innerCounter”: 1
},
{
“innerCounter”: 1
}
]
}
}
I was able to get my app back up by pulling the code out of the library actions and into API actions, but it would be great to be able revert to figure out how to revert to how things were working previously. Thanks for the help!