Permalink
Browse files

Fix first slash bug

  • Loading branch information...
1 parent 1db96d0 commit 83701248e499a2a2f0f84c8836493aebc87fa396 @pvorb committed Feb 16, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 bake.js
View
@@ -132,16 +132,16 @@ var bake = function(conf, hooks, cb) {
prop._id = prop._id.replace(/\/, '/');
}
- // Remove first slash
- if (/^\//, prop._id)
- prop._id = prop._id.substring(1);
-
// Add output dir
resName = path.resolve(outputDir, prop._id);
// Render ejs-template
result = ejs.render(result, { locals: prop });
+ // Remove first slash
+ if (/^\//, prop._id)
+ prop._id = prop._id.substring(1)
+
// Write contents
fs.writeFile(resName, result, function(err) {
// Throw errors

0 comments on commit 8370124

Please sign in to comment.