From f0d53c4350ce4509613196407e42b06c4261a8fa Mon Sep 17 00:00:00 2001 From: Josh Nisenson Date: Tue, 31 Jan 2012 12:05:42 -0600 Subject: [PATCH 1/2] Update backbone-couchdb.js --- backbone-couchdb.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backbone-couchdb.js b/backbone-couchdb.js index 1a65edf..1aad7db 100644 --- a/backbone-couchdb.js +++ b/backbone-couchdb.js @@ -1,4 +1,3 @@ - /* (c) 2011 Jan Monschke v1.1 @@ -73,7 +72,7 @@ backbone-couchdb.js is licensed under the MIT license. _ref = data.rows; for (_i = 0, _len = _ref.length; _i < _len; _i++) { doc = _ref[_i]; - _temp.push(doc.value); + (doc.value) ? _temp.push(doc.value) : _temp.push(doc.doc); } opts.success(_temp); return opts.complete(); From fd82457e2561ae3aafb074f6356e0adf608f40c8 Mon Sep 17 00:00:00 2001 From: Josh Nisenson Date: Wed, 1 Feb 2012 10:27:26 -0600 Subject: [PATCH 2/2] Update backbone-couchdb.coffee --- backbone-couchdb.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backbone-couchdb.coffee b/backbone-couchdb.coffee index 0e307a0..7b926d2 100644 --- a/backbone-couchdb.coffee +++ b/backbone-couchdb.coffee @@ -65,7 +65,7 @@ Backbone.couch_connector = con = success : (data) => _temp = [] for doc in data.rows - _temp.push doc.value + if doc.value then _temp.push doc.value else _temp.push doc.doc opts.success _temp opts.complete() error : ->