Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
♻️ check for typeof instead of falsy value
Browse files Browse the repository at this point in the history
  • Loading branch information
dok committed Oct 24, 2019
1 parent 64881c7 commit de75ab7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/syntax-highlighter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = (code, lang, opts = { dark: false, tokenizeVariables: false })
{
className: opts.dark ? 'cm-s-tomorrow-night' : 'cm-s-neo',
},
codemirror(code || '', lang, opts),
codemirror(typeof code === 'string' ? code : '', lang, opts),
);

module.exports.uppercase = require('./uppercase');

0 comments on commit de75ab7

Please sign in to comment.