scttnlsn / backbone.io

Backbone.js sync via Socket.IO

Home Page:http://scttnlsn.github.io/backbone.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught TypeError: Object {object} has no method 'ready'

awm33 opened this issue · comments

Hi,

I keep getting an error of Uncaught TypeError: Object {object} has no method 'ready' sometimes. {object} being the model or collection name. users or enrollment in my case.

It only happens part of the time. I'm not sure why. It looks like either backbone.io isn't loading in time or not executing in time.

I am using require.js. I'm naming backbone.io as a dependancy in the require.js config for each model and collection module. I've also tried using #55 but this doesn't seem to help.

Any ideas?

Thanks

Hi @awm33, are you still experiencing this error? Could you cite a line number?

Take a look at my update to #55. The dependencies seem to be set up correctly there.

I was able to resolve it by including backbone.io as a requirement in each model/collection, which I wasn't doing before. Silly mistake on my end, but you do have to list each as dependent and require in each model/collection file.