Skip to content
Snippets Groups Projects
Commit 932a3dc1 authored by echicken's avatar echicken
Browse files

'this' is not scoped correctly in private function, make a 'self' instead and...

'this' is not scoped correctly in private function, make a 'self' instead and use it. (For ragnarok)
parent 082a9fce
No related branches found
No related tags found
No related merge requests found
......@@ -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);
});
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment