Client Side 'sum' not functioning as expected

This may be a bug but I wanted to see if someone else could verify it for me or tell me if this is my problem. I updated to v2.5.2 a few days ago and shortly afterwards I have begun to have a big problem on my site.

I use a function to sum the fields of a data set returned by a server connect, like this:‘amount’)

This has stopped working and I am getting a referenceError in the console.

These both return a value:[0].amount[1].amount

The error I am seeing is:

    parser.js:384 ReferenceError: item is not defined
    at array.js:242
    at Array.reduce (<anonymous>)
    at n.sum (array.js:240)
    at parser.js:708
    at parser.js:449
    at Object.dmx.parse (parser.js:382)
    at Object.dmx.parse (parser.js:369)
    at n.<anonymous> (BaseComponent.js:316)
    at Array.forEach (<anonymous>)
    at n.$updateBindings (BaseComponent.js:314)

To reproduce, create a server connect that retuns a number of rows that include a numeric field. Sum the field and see what happens.

Ok this is definitely a bug.

I just replaced dmxAppConnect/dmxFormatter/dmxFormatter.js with the previous version and it is now working.

I have attached the working version for those of you that need a quick fix. (TIP: I made the file read only so that Wappler would not overwrite it on the next Save). (8.0 KB) (7.4 KB) Here new updated version that will be included in the next update, or you could use the previous working version.

Fixed in Wappler 2.5.4