diff options
author | Jan Lehnardt <jan@apache.org> | 2010-08-18 14:44:07 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2010-08-18 14:44:07 +0000 |
commit | b834461d54680d022d68725db68bbb9315768734 (patch) | |
tree | 59f6916204ecbe3596f31beabed1ff6fdf1f2113 /share/www/script/couch.js | |
parent | d4d0fea20b9ed41df9aa40eb413f37c87eac6c40 (diff) |
Fix test suite for Chrome and Safari.
couch.js patch by Robert Newson.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@986710 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/couch.js')
-rw-r--r-- | share/www/script/couch.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/share/www/script/couch.js b/share/www/script/couch.js index b7e0e513..7d189399 100644 --- a/share/www/script/couch.js +++ b/share/www/script/couch.js @@ -397,8 +397,8 @@ CouchDB.newXhr = function() { } CouchDB.request = function(method, uri, options) { - options = options || {}; - options.headers = options.headers || {}; + options = typeof(options) == 'object' ? options : {}; + options.headers = typeof(options.headers) == 'object' ? options.headers : {}; options.headers["Content-Type"] = options.headers["Content-Type"] || options.headers["content-type"] || "application/json"; options.headers["Accept"] = options.headers["Accept"] || options.headers["accept"] || "application/json"; var req = CouchDB.newXhr(); |