diff --git a/lib/cradle/database/views.js b/lib/cradle/database/views.js index 6cab805..a2d9a14 100644 --- a/lib/cradle/database/views.js +++ b/lib/cradle/database/views.js @@ -115,6 +115,12 @@ Database.prototype.list = function (path, options) { } } + if (path.length < 4) { + path = ['_design', path[0], '_list', path[1], path[2]].map(querystring.escape).join('/'); + } else { + path = ['_design', path[0], '_list', path[1], path[2], path[3]].map(querystring.escape).join('/'); + } + this._getOrPostView( path, { query: options, cache: cache, raw: true },