Permalink
Browse files

Define views only if "views" key presented

Change-Id: I323d02aae236170b30d75c82ed95a44d1599964b
Reviewed-on: http://review.couchbase.org/16406
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Chris Anderson <jchris@couchbase.com>
  • Loading branch information...
1 parent 20dc042 commit 6a85a35507aa0618ef5273ccef76bc519e676571 @avsej avsej committed with Chris Anderson May 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/couchbase/view_row.rb
@@ -106,7 +106,7 @@ def initialize(bucket, data)
@data['id']
end
@views = []
- if design_doc?
+ if design_doc? && @doc.has_key?('views')
@doc['views'].each do |name, _|
@views << name
self.instance_eval <<-EOV, __FILE__, __LINE__ + 1

0 comments on commit 6a85a35

Please sign in to comment.