From 5d918e616119e308ca38dc847dd8165e089557dc Mon Sep 17 00:00:00 2001 From: Robert Newson Date: Thu, 30 Sep 2010 12:22:29 +0000 Subject: COUCHDB-903 - add {ok, true} to COPY result. Thanks to Bob Dionne for original patch. I've modified it to fix the badmatch error if you do COPY without a Destination header. It now yields a 400 (Bad Request) error without spewing a stack trace. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1003035 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/couch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share/www/script/couch.js') diff --git a/share/www/script/couch.js b/share/www/script/couch.js index 913f58fb..633abe96 100644 --- a/share/www/script/couch.js +++ b/share/www/script/couch.js @@ -121,7 +121,7 @@ function CouchDB(name, httpHeaders) { CouchDB.maybeThrowError(this.last_req); var results = JSON.parse(this.last_req.responseText); for (var i = 0; i < docs.length; i++) { - if(results[i] && results[i].rev) { + if(results[i] && results[i].rev && results[i].ok) { docs[i]._rev = results[i].rev; } } -- cgit v1.2.3