summaryrefslogtreecommitdiff
path: root/share/www/script/jquery.couch.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/www/script/jquery.couch.js')
-rw-r--r--share/www/script/jquery.couch.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
index 3c629e1d..e974a3c4 100644
--- a/share/www/script/jquery.couch.js
+++ b/share/www/script/jquery.couch.js
@@ -239,9 +239,9 @@
dataType: "json", data: toJSON(doc),
complete: function(req) {
var resp = $.httpData(req, "json");
- doc._id = resp.id;
- doc._rev = resp.rev;
if (req.status == 201) {
+ doc._id = resp.id;
+ doc._rev = resp.rev;
if (options.success) options.success(resp);
} else if (options.error) {
options.error(req.status, resp.error, resp.reason);