Skip to content

Commit

Permalink
code improvement: no-string-literals in the rich-text package (#32142)
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath authored May 26, 2021
1 parent 6297274 commit a502322
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/rich-text/src/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { select } from '@wordpress/data';
/**
* Internal dependencies
*/

import { store as richTextStore } from './store';
import { isFormatEqual } from './is-format-equal';
import { createElement } from './create-element';
import { mergePair } from './concat';
Expand Down Expand Up @@ -56,7 +56,7 @@ function toFormat( { type, attributes } ) {
let formatType;

if ( attributes && attributes.class ) {
formatType = select( 'core/rich-text' ).getFormatTypeForClassName(
formatType = select( richTextStore ).getFormatTypeForClassName(
attributes.class
);

Expand All @@ -73,7 +73,7 @@ function toFormat( { type, attributes } ) {
}

if ( ! formatType ) {
formatType = select( 'core/rich-text' ).getFormatTypeForBareElement(
formatType = select( richTextStore ).getFormatTypeForBareElement(
type
);
}
Expand Down

0 comments on commit a502322

Please sign in to comment.