I have come across a strange issue while updating a dynamic list. The process requires me to some a a total of (Doubles) Values for each object. On mount the logic works flawlessly. however when updating the dates through a date picker and re-retrieving the data from the database i cannot sum up the values of the doubles merely list them. I receive the following error in console.
bundle.js:35 Uncaught (in promise) TypeError: Reduce of empty array with no initial value
at Array.reduce ()
at bundle.js:35:18241
at async Promise.all (/CB411F83-2292-179C-FF6B-D25974153100/32A961CE-FB71-4A06-B46E-E1040B4AE1A3/files/ui-builder/containers/default/index 1)
at async Object.onClick (bundle.js:35:17)
On before mount i run this logic and it works flawlessly
I then have to date pickers which adjust the where clause, a start and end date. with a submit button.
the same logic works on 18 of the 22 populated fields in the dynamic/list slash repeater. The logic works on the remaining 4 if i remove the sum of list function and just have the values mapped in the the dynamic list.
I cant follow how the same logic can work for some and not others.
bundle.js:33 Uncaught (in promise) TypeError: Reduce of empty array with no initial value at Array.reduce () at bundle.js:33:18776 at async Promise.all (/CB411F83-2292-179C-…ers/default/index 1) at async Object.onBeforeMount (bundle.js:33:17)