Skip to content

Commit

Permalink
build: minor code tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Sep 21, 2014
1 parent 8880a8b commit 1b098fb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ function iconStyle (files, useIcons) {
*/

function html(files, dir, useIcons, view) {
return '<ul id="files" class="view-'+view+'">'
return '<ul id="files" class="view-' + view + '">'
+ (view == 'details' ? (
'<li class="header">'
+ '<span class="name">Name</span>'
Expand Down Expand Up @@ -459,11 +459,9 @@ function stat(dir, files, cb) {
files.forEach(function(file){
batch.push(function(done){
fs.stat(join(dir, file), function(err, stat){
if (err && err.code !== 'ENOENT') {
// pass ENOENT as null stat, not error
return done(err);
}
if (err && err.code !== 'ENOENT') return done(err);

// pass ENOENT as null stat, not error
done(null, stat || null);
});
});
Expand Down

0 comments on commit 1b098fb

Please sign in to comment.