summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-highlight/src/CodeBlock.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-10-12 15:47:29 +0200
committerSamy Pesse <samypesse@gmail.com>2016-10-12 15:47:29 +0200
commit961b9d7031347c2c108b22c9c4cf85ce3e0c63d0 (patch)
tree770e0219c17f4875df6a7549cf7afcb356fcfb99 /packages/gitbook-plugin-highlight/src/CodeBlock.js
parent5b0622014afe35a7f1eda9a47e2f94710304f8c6 (diff)
downloadgitbook-961b9d7031347c2c108b22c9c4cf85ce3e0c63d0.zip
gitbook-961b9d7031347c2c108b22c9c4cf85ce3e0c63d0.tar.gz
gitbook-961b9d7031347c2c108b22c9c4cf85ce3e0c63d0.tar.bz2
Fix error for code blocks without language
Diffstat (limited to 'packages/gitbook-plugin-highlight/src/CodeBlock.js')
-rw-r--r--packages/gitbook-plugin-highlight/src/CodeBlock.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/gitbook-plugin-highlight/src/CodeBlock.js b/packages/gitbook-plugin-highlight/src/CodeBlock.js
index 89f6793..a556d36 100644
--- a/packages/gitbook-plugin-highlight/src/CodeBlock.js
+++ b/packages/gitbook-plugin-highlight/src/CodeBlock.js
@@ -29,7 +29,7 @@ const CodeBlock = React.createClass({
render() {
const { children, className } = this.props;
const content = getChildrenToText(children);
- const lang = getLanguage(className);
+ const lang = getLanguage(className || '');
const includeCSS = <GitBook.ImportCSS href="gitbook/highlight/white.css" />;