Skip to content

Commit

Permalink
Fixed crash when env is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Oct 11, 2017
1 parent 3353462 commit b9821dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules_inline/link.js
Expand Up @@ -98,7 +98,7 @@ module.exports = function link(state, silent) {
//
// Link reference
//
if (typeof state.env.references === 'undefined') { return false; }
if (!state.env || typeof state.env.references === 'undefined') { return false; }

if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {
start = pos + 1;
Expand Down

0 comments on commit b9821dd

Please sign in to comment.