Skip to content
This repository
Browse code

Merge pull request #82 from ForbesLindesay/patch-1

Support `then-jade` in `jade.render` function
  • Loading branch information...
commit 5cfeff9589e4878d336144362d61aa27a64dbf23 2 parents ee2234e + 216d499
TJ Holowaychuk authored

Showing 1 changed file with 8 additions and 1 deletion. Show diff stats Hide diff stats

  1. +8 1 lib/consolidate.js
9 lib/consolidate.js
@@ -169,7 +169,14 @@ exports.jade = function(path, options, fn){
169 169 */
170 170
171 171 exports.jade.render = function(str, options, fn){
172   - var engine = requires.jade || (requires.jade = require('jade'));
  172 + var engine = requires.jade;
  173 + if (!engine) {
  174 + try {
  175 + engine = requires.jade = require('jade');
  176 + } catch (err) {
  177 + engine = requires.jade = require('then-jade');
  178 + }
  179 + }
173 180 engine.render(str, options, fn);
174 181 };
175 182

0 comments on commit 5cfeff9

Please sign in to comment.
Something went wrong with that request. Please try again.