diff --git a/package-lock.json b/package-lock.json
index a56c262..2caf5cb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "react-mobiledoc-editor",
- "version": "0.14.1",
+ "version": "0.14.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "react-mobiledoc-editor",
- "version": "0.14.1",
+ "version": "0.14.2",
"license": "BSD-3-Clause",
"dependencies": {
"prop-types": "^15.8.1"
diff --git a/package.json b/package.json
index e210ad4..06b0a3f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "react-mobiledoc-editor",
- "version": "0.14.1",
+ "version": "0.14.2",
"description": "A Mobiledoc editor for React apps",
"repository": "joshfrench/react-mobiledoc-editor",
"homepage": "https://github.com/joshfrench/react-mobiledoc-editor",
diff --git a/src/components/LinkButton.js b/src/components/LinkButton.js
index 69d9992..0195c83 100644
--- a/src/components/LinkButton.js
+++ b/src/components/LinkButton.js
@@ -26,14 +26,14 @@ const LinkButton = ({
}
};
- className = [
+ const currentClassName = [
className,
activeMarkupTags.indexOf('a') > -1 && activeClassName,
]
.filter(Boolean)
.join(' ');
- props = { type, ...props, onClick, className };
+ props = { type, ...props, onClick, className: currentClassName };
return ;
}}
diff --git a/src/components/MarkupButton.js b/src/components/MarkupButton.js
index bf942d1..34cf847 100644
--- a/src/components/MarkupButton.js
+++ b/src/components/MarkupButton.js
@@ -15,13 +15,13 @@ const MarkupButton = ({
{({ editor, activeMarkupTags = [] }) => {
const onClick = () => editor.toggleMarkup(tag);
- className = [
+ const currentClassName = [
className,
activeMarkupTags.indexOf(tag.toLowerCase()) > -1 && activeClassName,
]
.filter(Boolean)
.join(' ');
- props = { type, ...props, onClick, className };
+ props = { type, ...props, onClick, className: currentClassName };
return ;
}}
diff --git a/src/components/SectionButton.js b/src/components/SectionButton.js
index 0939b7f..0ca40c4 100644
--- a/src/components/SectionButton.js
+++ b/src/components/SectionButton.js
@@ -15,13 +15,13 @@ const SectionButton = ({
{({ editor, activeSectionTags = [] }) => {
const onClick = () => editor.toggleSection(tag);
- className = [
+ const currentClassName = [
className,
activeSectionTags.indexOf(tag.toLowerCase()) > -1 && activeClassName,
]
.filter(Boolean)
.join(' ');
- props = { type, ...props, onClick, className };
+ props = { type, ...props, onClick, className: currentClassName };
return ;
}}