Skip to content

Commit

Permalink
Cleaning up this.debounced from the debounced function
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Mar 5, 2017
1 parent d8e5beb commit 6abcf10
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/haro.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@
}

this.debounced.set(key, setTimeout(() => {
this.debounced.delete(key);
this.transmit(key, null, og, false, "delete").catch(err => {
if (this.logging) {
console.error(err.stack || err.message || err);
Expand Down Expand Up @@ -907,6 +908,7 @@
}

this.debounced.set(key, setTimeout(() => {
this.debounced.delete(key);
this.transmit(key, x, og, override, method).catch(e => {
if (this.logging) {
console.error(e.stack || e.message || e);
Expand Down
2 changes: 2 additions & 0 deletions lib/haro.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}

_this3.debounced.set(key, setTimeout(function () {
_this3.debounced.delete(key);
_this3.transmit(key, null, og, false, "delete").catch(function (err) {
if (_this3.logging) {
console.error(err.stack || err.message || err);
Expand Down Expand Up @@ -1109,6 +1110,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}

_this13.debounced.set(key, setTimeout(function () {
_this13.debounced.delete(key);
_this13.transmit(key, x, og, override, method).catch(function (e) {
if (_this13.logging) {
console.error(e.stack || e.message || e);
Expand Down
Loading

0 comments on commit 6abcf10

Please sign in to comment.