This is an automated email from the ASF dual-hosted git repository.
glynnbird pushed a commit to branch issue85
in repository https://gitbox.apache.org/repos/asf/couchdb-nano.git
The following commit(s) were added to refs/heads/issue85 by this push:
new f3352a1 use Object.assign to clone object
f3352a1 is described below
commit f3352a180b2910e687fc8fcfc462596d74cf902c
Author: Glynn Bird <[email protected]>
AuthorDate: Mon Jul 2 14:13:02 2018 +0100
use Object.assign to clone object
---
lib/nano.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/nano.js b/lib/nano.js
index 37e86db..3a0aef3 100644
--- a/lib/nano.js
+++ b/lib/nano.js
@@ -554,7 +554,7 @@ module.exports = exports = nano = function dbScope(cfg) {
qs = qs || {};
// prevent mutation of the client qs object by using a clone
- qs = JSON.parse(JSON.stringify(qs))
+ qs = Object.assign({}, qs)
var viewPath = '_design/' + ddoc + '/_' + meta.type + '/' + viewName;