diff --git a/exec/load/freqit_common.js b/exec/load/freqit_common.js index cdb57cf4148981e2967ad0b7a701979f894a428c..2e25dcbce69639d679d3242c9dfe41a617fd7faa 100644 --- a/exec/load/freqit_common.js +++ b/exec/load/freqit_common.js @@ -40,13 +40,14 @@ var FREQIT = { var file=undefined; var count=0; + const self = this; function handle_list(list) { list.forEach(function(dir) { - if (this.dircache[dir] === undefined) - this.dircache[dir] = new FileBase(dir); - this.dircache[dir].forEach(function(fent) { + if (self.dircache[dir] === undefined) + self.dircache[dir] = new FileBase(dir); + self.dircache[dir].forEach(function(fent) { if (wildmatch(fent.name, match, true)) - this.add_file(fent.path, cb_data); + self.add_file(fent.path, cb_data); }); }); }