# Cannot read property 'add' of undefined

**URL:** <https://forums.fusetools.com/t/cannot-read-property-add-of-undefined/3103>\
**Category:** How-to Discussions\
**Created:** [September 26, 2016, 2:54am UTC](https://forums.fusetools.com/t/cannot-read-property-add-of-undefined/3103 "2016-09-26T02:54:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mthomson](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/mthomson/32/174_2.png) [@mthomson](https://forums.fusetools.com/u/mthomson)\
**Post date:** [September 26, 2016, 2:54am UTC](https://forums.fusetools.com/t/cannot-read-property-add-of-undefined/3103/1 "2016-09-26T02:54:03Z")

</div>

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...]()

---

<div class="post-metadata">

**Author:** ![mgleason\_3](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@mgleason\_3](https://forums.fusetools.com/u/mgleason_3)\
**Post date:** [September 26, 2016, 4:11am UTC](https://forums.fusetools.com/t/cannot-read-property-add-of-undefined/3103/2 "2016-09-26T04:11:35Z")

</div>

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});`

---

<div class="post-metadata">

**Author:** ![mthomson](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/mthomson/32/174_2.png) [@mthomson](https://forums.fusetools.com/u/mthomson)\
**Post date:** [September 26, 2016, 5:12am UTC](https://forums.fusetools.com/t/cannot-read-property-add-of-undefined/3103/3 "2016-09-26T05:12:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mthomson](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/mthomson/32/174_2.png) [@mthomson](https://forums.fusetools.com/u/mthomson)\
**Post date:** [September 26, 2016, 6:45am UTC](https://forums.fusetools.com/t/cannot-read-property-add-of-undefined/3103/4 "2016-09-26T06:45:59Z")

</div>

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!
