Skip to content

Commit

Permalink
[#1] use copy of options parameter when configuring es client
Browse files Browse the repository at this point in the history
Fixes #1.
  • Loading branch information
markbirbeck committed Nov 18, 2015
1 parent 156161d commit d3b1b20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/dest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var util = require('util');
var _ = require('lodash');

var h = require('highland');
var elasticsearch = require('elasticsearch');
Expand All @@ -13,7 +14,7 @@ module.exports = function dest (glob, opt) {

return h.pipeline(function(stream) {
var _stream = (opt.rateLimit) ? stream.ratelimit(1, opt.rateLimit) : stream;
var client = new elasticsearch.Client(opt);
var client = new elasticsearch.Client(_.clone(opt));

return _stream
/**
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"homepage": "https://github.com/markbirbeck/vinyl-elasticsearch",
"dependencies": {
"elasticsearch": "^9.0.0",
"highland": "^2.5.1"
"highland": "^2.5.1",
"lodash": "^3.10.1"
},
"devDependencies": {
"gulp": "^3.9.0"
Expand Down

0 comments on commit d3b1b20

Please sign in to comment.