Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support `then-jade` in `jade.render` function #82

Merged
merged 1 commit into from

2 participants

@ForbesLindesay

I'm not sure why I missed this off my last pull request.

@tj tj merged commit 5cfeff9 into tj:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 6, 2013
  1. @ForbesLindesay
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/consolidate.js
View
9 lib/consolidate.js
@@ -169,7 +169,14 @@ exports.jade = function(path, options, fn){
*/
exports.jade.render = function(str, options, fn){
- var engine = requires.jade || (requires.jade = require('jade'));
+ var engine = requires.jade;
+ if (!engine) {
+ try {
+ engine = requires.jade = require('jade');
+ } catch (err) {
+ engine = requires.jade = require('then-jade');
+ }
+ }
engine.render(str, options, fn);
};
Something went wrong with that request. Please try again.