Commit 9c829cd1 authored by Tristan Cavelier's avatar Tristan Cavelier

localstorage.js: post doesn't store "_id" - fixed

parent d8602cf1
...@@ -137,9 +137,11 @@ jIO.addStorageType('local', function (spec, my) { ...@@ -137,9 +137,11 @@ jIO.addStorageType('local', function (spec, my) {
} }
doc = localstorage.getItem(priv.localpath + "/" + doc_id); doc = localstorage.getItem(priv.localpath + "/" + doc_id);
if (doc === null) { if (doc === null) {
doc = command.cloneDoc();
doc._id = doc_id;
// the document does not exist // the document does not exist
localstorage.setItem(priv.localpath + "/" + doc_id, localstorage.setItem(priv.localpath + "/" + doc_id,
command.cloneDoc()); doc);
that.success({ that.success({
"ok": true, "ok": true,
"id": doc_id "id": doc_id
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment