diff options
-rw-r--r-- | lib/template/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/template/index.js b/lib/template/index.js index 3177ae0..ae11bc9 100644 --- a/lib/template/index.js +++ b/lib/template/index.js @@ -391,7 +391,7 @@ TemplateEngine.prototype.applyBlock = function(name, blk, ctx) { func = this.bindContext(block.process); r = func.call(ctx || {}, blk); - if (Promise.isPromise(r)) return r.then(normBlockResult); + if (Promise.isPromiseAlike(r)) return Promise(r).then(normBlockResult); else return normBlockResult(r); }; |