Skip to content

Commit

Permalink
Fix jsdoc type as ReactElement
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Jan 12, 2021
1 parent bdb65aa commit 015bb11
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions assets/src/block-editor/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,14 @@ export const removeAmpFitTextFromBlocks = ( settings, name ) => {
*
* @see removeAmpFitTextFromBlocks
*
* @param {Element} element Block save result.
* @param {ReactElement} element Block save result.
*
* @return {Element} Modified block if it is of `amp-fit-text` type, otherwise the original element is returned.
* @return {ReactElement} Modified block if it is of `amp-fit-text` type, otherwise the original element is returned.
*/
export const removeClassFromAmpFitTextBlocks = ( element ) => {
if ( 'amp-fit-text' === element.type && undefined !== element.props.className ) {
const { className, ...props } = element.props;
props.className = null;

element = cloneElement( element, props );
}

Expand Down

0 comments on commit 015bb11

Please sign in to comment.