diff --git a/lib/swsElasticEmitter.js b/lib/swsElasticEmitter.js index 6c44a9b..cd1c1c5 100644 --- a/lib/swsElasticEmitter.js +++ b/lib/swsElasticEmitter.js @@ -280,7 +280,7 @@ swsElasticEmitter.prototype.flush = function(){ } }).catch((error)=>{ debug(`Indexing Error: ${error.message}`); - that.enabled = false; + this.enabled = false; }); this.indexBuffer = '';