Browse Source

fix: check if state.env is undefined

pull/485/head
Andrew Martin 7 years ago
committed by GitHub
parent
commit
9c0a21ec54
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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
//
if (typeof state.env.references === 'undefined') { return false; }
if (typeof state.env === 'undefined' || typeof state.env.references === 'undefined') { return false; }
if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {
start = pos + 1;

Loading…
Cancel
Save