Permalink
Browse files

Added fs.existsSync fallback to get rid of 0.8 warnings.

  • Loading branch information...
1 parent 7e4eafa commit 5c5b1a3d54b0f836be4638fb001eb82128bbd392 @jakubpawlowicz committed Aug 2, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/assets.js
View
@@ -1,6 +1,7 @@
var fs = require('fs'),
path = require('path'),
- yaml = require('../vendor/yaml');
+ yaml = require('../vendor/yaml'),
+ existsSync = fs.existsSync || path.existsSync;
var AssetsExpander = function(pathToYaml, options) {
if (!pathToYaml) return;
@@ -46,7 +47,7 @@ AssetsExpander.prototype = {
});
} else {
var expanded = path.join(root, asset) + '.' + options.type;
- if (path.existsSync(expanded)) matches.push(expanded);
+ if (existsSync(expanded)) matches.push(expanded);
}
return matches;

0 comments on commit 5c5b1a3

Please sign in to comment.