joli.api.js icon indicating copy to clipboard operation
joli.api.js copied to clipboard

Undefined property data.metadata.remote + Fix

Open chrsch opened this issue 12 years ago • 0 comments

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

chrsch avatar Aug 21 '12 16:08 chrsch