mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-26 18:10:27 +00:00
Fixed JSHint complaining about making a function in a loop
This commit is contained in:
parent
a2cd450cbe
commit
b44f6b47cc
@ -65,18 +65,19 @@ function FileStore(dirpath,store,callback) {
|
|||||||
if(err) {
|
if(err) {
|
||||||
callback(err);
|
callback(err);
|
||||||
} else {
|
} else {
|
||||||
for(var t=0; t<files.length; t++) {
|
var loadCallback = function(task,tiddlers) {
|
||||||
var f = files[t];
|
|
||||||
if(["..",".",".DS_Store"].indexOf(f) === -1 && f.indexOf(".meta") !== f.length-5) {
|
|
||||||
self.loadQueue.push({
|
|
||||||
filepath: path.resolve(self.dirpath,f),
|
|
||||||
callback: function(task,tiddlers) {
|
|
||||||
for(var t=0; t<tiddlers.length; t++) {
|
for(var t=0; t<tiddlers.length; t++) {
|
||||||
var tiddler = tiddlers[t];
|
var tiddler = tiddlers[t];
|
||||||
self.sources[tiddler.title] = task.filepath;
|
self.sources[tiddler.title] = task.filepath;
|
||||||
self.store.addTiddler(tiddler);
|
self.store.addTiddler(tiddler);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
for(var t=0; t<files.length; t++) {
|
||||||
|
var f = files[t];
|
||||||
|
if(["..",".",".DS_Store"].indexOf(f) === -1 && f.indexOf(".meta") !== f.length-5) {
|
||||||
|
self.loadQueue.push({
|
||||||
|
filepath: path.resolve(self.dirpath,f),
|
||||||
|
callback: loadCallback
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user