joli.api.js
joli.api.js copied to clipboard
Undefined property data.metadata.remote + Fix
Hi,
Line 245 states "if(data.metadata.remote) {". For me it crashes here (using Titanium btw.) because data.metadata is undefined.
It turned out the record._metadata implementation is simply missing in the current version of joli.js.
Change this to joli.js in order to fix the issue:
record.prototype.save:
var data = {
data: this._data,
metadata: this._metadata
};
Add this to joli.record
this._metadata = {};
Cheers, Christoph