1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-26 01:50:28 +00:00

Fixed JSHint complaining about making a function in a loop

This commit is contained in:
Jeremy Ruston 2012-04-03 16:59:55 +01:00
parent a2cd450cbe
commit b44f6b47cc

View File

@ -65,18 +65,19 @@ function FileStore(dirpath,store,callback) {
if(err) {
callback(err);
} else {
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: function(task,tiddlers) {
var loadCallback = function(task,tiddlers) {
for(var t=0; t<tiddlers.length; t++) {
var tiddler = tiddlers[t];
self.sources[tiddler.title] = task.filepath;
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
});
}
}