Skip to content

Commit

Permalink
Merge pull request #35 from jnisenson/master
Browse files Browse the repository at this point in the history
Fix for "include_docs : true" when the view emits a null value
  • Loading branch information
janmonschke committed Feb 1, 2012
2 parents d5375de + fd82457 commit de45b6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backbone-couchdb.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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 : ->
Expand Down
3 changes: 1 addition & 2 deletions backbone-couchdb.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
(c) 2011 Jan Monschke
v1.1
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit de45b6b

Please sign in to comment.