Open reubano opened 11 years ago
Well, the error was with createItem
. And the following fixes it
Sync.prototype.createItem = function(item) {
// console.log(item)
if (item.id && !_.include(this.storage.destroyIds.values, item.id.toString())) {
item.sid = item.id;
delete item.id;
return this.collection.items.create(item, {
local: true
});
}
};
The wierd part is that with the logging on, it spells 'success' with each item being one letter. I don't know why that is.
Another data point.... for ajax queries, the textStatus
argument is success
on successful calls.
Cool - thanks for the fix of the item.id is undefined bug!
When I run
@collection.storage.sync.pull()
or@collection.fetch()
I get the errorTypeError: item.id is undefined
. Push works fine and posts to my restapi. Any idea what I'm doing wrong?