Skip to content

Commit abc29c3

Browse files
committed
Fix GitbookIO#804: correctly extract kwargs from blocks
1 parent 8356c53 commit abc29c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ TemplateEngine.prototype.addBlock = function(name, block) {
250250

251251
// Extract main body and kwargs
252252
var body = args.pop();
253-
var kwargs = args.pop() || {};
253+
var kwargs = _.isObject(_.last(args))? args.pop() : {};
254254

255255
// Extract blocks body
256256
var _blocks = _.map(block.blocks, function(blockName, i){

0 commit comments

Comments
 (0)