You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by gl...@apache.org on 2020/02/13 14:23:41 UTC

[couchdb-nano] 02/03: _local support added #167

This is an automated email from the ASF dual-hosted git repository.

glynnbird pushed a commit to branch localdocs
in repository https://gitbox.apache.org/repos/asf/couchdb-nano.git

commit 100f78001d186027e18a93b7e796567366192db3
Author: Malte Legenhausen <ml...@gmail.com>
AuthorDate: Fri Aug 30 16:47:49 2019 +0200

    _local support added #167
---
 lib/nano.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/nano.js b/lib/nano.js
index 79fbfb5..21b5bab 100644
--- a/lib/nano.js
+++ b/lib/nano.js
@@ -225,7 +225,7 @@ module.exports = exports = function dbScope (cfg) {
     if (opts.path) {
       req.uri += '/' + opts.path
     } else if (opts.doc) {
-      if (!/^_design/.test(opts.doc)) {
+      if (!/^_design|_local/.test(opts.doc)) {
         // http://wiki.apache.org/couchdb/HTTP_Document_API#Naming.2FAddressing
         req.uri += '/' + encodeURIComponent(opts.doc)
       } else {