Skip to content

Commit

Permalink
Not need to remove this logic. It doesn't hurt to check if font are l…
Browse files Browse the repository at this point in the history
…oaded again :)
  • Loading branch information
spacedmonkey committed Sep 2, 2019
1 parent 673d31c commit aab610e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
BLOCK_ROTATION_SNAPS,
BLOCK_ROTATION_SNAP_GAP,
} from '../../constants';
import { getBlockOrderDescription, getCallToActionBlock } from '../../helpers';
import { getBlockOrderDescription, maybeEnqueueFontStyle, getCallToActionBlock } from '../../helpers';
import bringForwardIcon from '../../../../images/stories-editor/bring-forward.svg';
import sendBackwardIcon from '../../../../images/stories-editor/send-backwards.svg';
import bringFrontIcon from '../../../../images/stories-editor/bring-front.svg';
Expand Down Expand Up @@ -432,8 +432,9 @@ export default createHigherOrderComponent(
<FontFamilyPicker
fonts={ ampStoriesFonts }
value={ ampFontFamily }
onChange={ ( font ) => {
setAttributes( { ampFontFamily: font.name } );
onChange={ ( value ) => {
maybeEnqueueFontStyle( value );
setAttributes( { ampFontFamily: value } );
} }
/>
<ToggleControl
Expand Down

0 comments on commit aab610e

Please sign in to comment.