Skip to content

Commit 2c69f05

Browse files
committed
use 'this' if 'this.context' is not available
1 parent 22d3c4b commit 2c69f05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = function markdown(config) {
4040
}
4141

4242
var md = new Remarkable(options);
43-
var ctx = merge({}, options, this, this.context, context);
43+
var ctx = merge({}, options, (this.context || this), context);
4444
return md.render(options.fn(ctx));
4545
}
4646

0 commit comments

Comments
 (0)