From 13bf305aeb29bbadd0695ee02a3735e62cc4f21f Mon Sep 17 00:00:00 2001 From: Oluwaseun Olorunsola Date: Fri, 22 Nov 2024 17:44:40 +0100 Subject: [PATCH] Update filter name and add reason for ts-ignore MAILPOET-6315 --- .../assets/js/src/mailpoet-email-editor-integration/index.ts | 2 +- packages/js/email-editor/src/editor.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mailpoet/assets/js/src/mailpoet-email-editor-integration/index.ts b/mailpoet/assets/js/src/mailpoet-email-editor-integration/index.ts index 70d586025f..1ca72cba28 100644 --- a/mailpoet/assets/js/src/mailpoet-email-editor-integration/index.ts +++ b/mailpoet/assets/js/src/mailpoet-email-editor-integration/index.ts @@ -6,6 +6,6 @@ import { addFilter } from '@wordpress/hooks'; import { withNpsPoll } from '../nps-poll'; import './index.scss'; -addFilter('mailpoet_email_editor_the_editor_component', 'mailpoet', (editor) => +addFilter('mailpoet_email_editor_wrap_editor_component', 'mailpoet', (editor) => withNpsPoll(editor), ); diff --git a/packages/js/email-editor/src/editor.tsx b/packages/js/email-editor/src/editor.tsx index bb82345b13..52ceb8bdbb 100644 --- a/packages/js/email-editor/src/editor.tsx +++ b/packages/js/email-editor/src/editor.tsx @@ -33,7 +33,7 @@ function Editor() { } const WrappedEditor = applyFilters( - 'mailpoet_email_editor_the_editor_component', + 'mailpoet_email_editor_wrap_editor_component', Editor ); @@ -47,6 +47,6 @@ export function initialize( elementId: string ) { initBlocks(); initHooks(); const root = createRoot( container ); - // @ts-ignore + // @ts-ignore We don't have a type for WrappedEditor. root.render( ); }