diff --git a/components/Carbon.js b/components/Carbon.js index a337902..764e7bb 100644 --- a/components/Carbon.js +++ b/components/Carbon.js @@ -113,10 +113,11 @@ class Carbon extends React.PureComponent { onSelectionChange = changes => { if (this.state.selectionAt) { const css = [ - changes.bold && `font-weight: ${changes.bold ? 'bold' : 'initial'}`, - changes.italics && `font-style: ${changes.italics ? 'italic' : 'initial'}`, - changes.underline && `text-decoration: ${changes.underline ? 'underline' : 'initial'}`, - changes.color && `color: ${changes.color} !important` + changes.bold != null && `font-weight: ${changes.bold ? 'bold' : 'initial'}`, + changes.italics != null && `font-style: ${changes.italics ? 'italic' : 'initial'}`, + changes.underline != null && + `text-decoration: ${changes.underline ? 'underline' : 'initial'}`, + changes.color != null && `color: ${changes.color} !important` ] .filter(Boolean) .join('; ')