Skip to content

Commit

Permalink
Merge pull request #102 from OpportunityLiu/patch-1
Browse files Browse the repository at this point in the history
fix: avoid `ReferenceError` in browser
  • Loading branch information
valeriangalliat authored Jul 23, 2021
2 parents 1f44060 + 101d981 commit 74402b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion permalink.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function legacy (slug, opts, state, idx) {
if (!emittedWarning) {
const warningText = 'Using deprecated markdown-it-anchor permalink option, see https://github.com/valeriangalliat/markdown-it-anchor#todo-anchor-or-file'

if (process && process.emitWarning) {
if (typeof process === 'object' && process && process.emitWarning) {
process.emitWarning(warningText)
} else {
console.warn(warningText)
Expand Down

0 comments on commit 74402b7

Please sign in to comment.