Cannot read property 'add' of undefined

Any idea what’s going on here? I’ve got an observable list but it won’t let me use .add property to add another entry in the list.

Error: JavaScript call error in calendar.js line 330: Name: TypeError: Cannot re
ad property ‘add’ of undefined
Error message: Uncaught TypeError: Cannot read property ‘add’ of undefined
File name: calendar.js
Line number: 330
Source line: monthData.add({theDate: x});
JS stack trace: TypeError: Cannot read property ‘add’ of undefined
at buildMonth (calendar.js:330:30)
at previousDay (calendar.js:410:5)
in Fuse.Reactive.EventBinding+CallClosure<C:\Users\ThomsoMa\AppData\Local\Fuset
ools\Fuse\App\app-0.26.0.7741\Packages\Fuse.Reactive\0.37.9$.uno:1149>

Uploading file...

Don’t know if it’s helpful, but I’ve gotten that error when I accidentally assigned something to the observable that’s not an observable - usually I meant to assign it to it’s value - e.g:

monthData = theDate // where “theDate” is not an observable and meant “monthData.value = theDate;”

or

monthData = now(); // when I mean “monthData.value = {now()};”

or

monthData = monthData.add({theDate: x});

Thanks for the suggestion. I’ll check it out!

Thanks I resolved the issue now. The function was returning a dataset at the end and writing over the Observable. This seemed to cause the problem. I stopped the function from returning the set and it works fine now.
Thanks!