summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-04-20 17:26:49 +0200
committerSamy Pessé <samypesse@gmail.com>2016-04-20 17:26:49 +0200
commit87db7cf1d412fa6fbd18e9a7e4f4755f2c0c5547 (patch)
treefad4742f9fafa61066d5de64e9448e6563040396 /lib
parent09ff802c7ed99ce269f464baa777ece483067969 (diff)
parent71b59b1950dbbb02e95b34dfdb26e8ad8c6e31a0 (diff)
downloadgitbook-87db7cf1d412fa6fbd18e9a7e4f4755f2c0c5547.zip
gitbook-87db7cf1d412fa6fbd18e9a7e4f4755f2c0c5547.tar.gz
gitbook-87db7cf1d412fa6fbd18e9a7e4f4755f2c0c5547.tar.bz2
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'lib')
-rw-r--r--lib/template/index.js2
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);
};