Replace ts-ignore with ts-expect-error
[MAILPOET-6438]
This commit is contained in:
committed by
Oluwaseun Olorunsola
parent
99d7191a23
commit
4059e5cef0
@ -67,7 +67,7 @@ function PersonalizationTagsButton( { contentRef }: Props ) {
|
|||||||
// Get the current block content
|
// Get the current block content
|
||||||
const blockContent: string = useSelect( ( select ) => {
|
const blockContent: string = useSelect( ( select ) => {
|
||||||
const attributes =
|
const attributes =
|
||||||
// @ts-ignore
|
// @ts-expect-error getBlockAttributes expects one argument, but TS thinks it expects none
|
||||||
select( 'core/block-editor' ).getBlockAttributes( selectedBlockId );
|
select( 'core/block-editor' ).getBlockAttributes( selectedBlockId );
|
||||||
return attributes?.content?.originalHTML || attributes?.content || ''; // After first saving the content does not have property originalHTML, so we need to check for content as well
|
return attributes?.content?.originalHTML || attributes?.content || ''; // After first saving the content does not have property originalHTML, so we need to check for content as well
|
||||||
} );
|
} );
|
||||||
|
@ -169,7 +169,7 @@ export function addAttribute( settings: Block ) {
|
|||||||
* @return {Function} Wrapped component.
|
* @return {Function} Wrapped component.
|
||||||
*/
|
*/
|
||||||
export const withLayoutControls = createHigherOrderComponent(
|
export const withLayoutControls = createHigherOrderComponent(
|
||||||
// @ts-ignore No types for this exist yet.
|
// @ts-expect-error No types for this exist yet.
|
||||||
( BlockEdit ) => ( props ) => {
|
( BlockEdit ) => ( props ) => {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||||
const supportLayout = hasLayoutBlockSupport( props.name );
|
const supportLayout = hasLayoutBlockSupport( props.name );
|
||||||
|
Reference in New Issue
Block a user