Permalink
Browse files

Should not throw on non found engine

  • Loading branch information...
1 parent 986c5c1 commit 21383f591584ad4682363e581a0cb031c95d0094 @eldargab committed May 16, 2012
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/engines/index.js
@@ -3,11 +3,7 @@ var extname = require('path').extname
var engines = module.exports = function (ext) {
var factory = engines.extensions[ext] || engines[ext]
- if (!factory) throw new Error(~ext.indexOf('.')
- ? 'Engine for ' + ext + ' not found'
- : 'Engine ' + ext + ' not found'
- )
- return factory()
+ return factory ? factory() : null
}
require('fs').readdirSync(__dirname).forEach(function (item) {

0 comments on commit 21383f5

Please sign in to comment.