Browse Source

Fixed crash when env is not defined

pull/403/head
Laurent Cozic 8 years ago
committed by GitHub
parent
commit
b9821ddf76
  1. 2
      lib/rules_inline/link.js

2
lib/rules_inline/link.js

@ -98,7 +98,7 @@ module.exports = function link(state, silent) {
// //
// Link reference // 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/* [ */) { if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {
start = pos + 1; start = pos + 1;

Loading…
Cancel
Save