Skip to content

Commit

Permalink
Fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Grondin committed Jul 3, 2018
1 parent 90f76ec commit 36293f8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bottleneck.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
var _ref5, _ref6, _splice$call3, _splice$call4;

ref = args, (_ref5 = ref, _ref6 = _toArray(_ref5), task = _ref6[0], args = _ref6.slice(1), _ref5), (_splice$call3 = splice.call(args, -1), _splice$call4 = _slicedToArray(_splice$call3, 1), cb = _splice$call4[0], _splice$call3);
options = this.jobDefaults;
options = parser.load({}, this.jobDefaults, {});
} else {
var _ref7, _ref8, _splice$call5, _splice$call6;

Expand Down Expand Up @@ -468,7 +468,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
task = _args2[0];
args = _args2.slice(1);

options = this.jobDefaults;
options = parser.load({}, this.jobDefaults, {});
} else {
var _args3 = args;

Expand Down
2 changes: 1 addition & 1 deletion bottleneck.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/Bottleneck.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
var _ref5, _ref6, _splice$call3, _splice$call4;

ref = args, (_ref5 = ref, _ref6 = _toArray(_ref5), task = _ref6[0], args = _ref6.slice(1), _ref5), (_splice$call3 = splice.call(args, -1), _splice$call4 = _slicedToArray(_splice$call3, 1), cb = _splice$call4[0], _splice$call3);
options = this.jobDefaults;
options = parser.load({}, this.jobDefaults, {});
} else {
var _ref7, _ref8, _splice$call5, _splice$call6;

Expand Down Expand Up @@ -467,7 +467,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
task = _args2[0];
args = _args2.slice(1);

options = this.jobDefaults;
options = parser.load({}, this.jobDefaults, {});
} else {
var _args3 = args;

Expand Down
4 changes: 2 additions & 2 deletions src/Bottleneck.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class Bottleneck
submit: (args...) =>
if typeof args[0] == "function"
[task, args..., cb] = args
options = @jobDefaults
options = parser.load {}, @jobDefaults, {}
else
[options, task, args..., cb] = args
options = parser.load options, @jobDefaults
Expand Down Expand Up @@ -210,7 +210,7 @@ class Bottleneck
schedule: (args...) =>
if typeof args[0] == "function"
[task, args...] = args
options = @jobDefaults
options = parser.load {}, @jobDefaults, {}
else
[options, task, args...] = args
options = parser.load options, @jobDefaults
Expand Down

0 comments on commit 36293f8

Please sign in to comment.