Fix an edge case where it might be possible for email content to have similar post-slug
MAILPOET-5949
This commit is contained in:
committed by
Oluwaseun Olorunsola
parent
16e4346d07
commit
fb5166ab7c
@@ -47,8 +47,7 @@ export function SelectTemplateModal( {
|
||||
const hasTemplates = templates?.length > 0;
|
||||
|
||||
const handleTemplateSelection = ( template: TemplatePreview ) => {
|
||||
const templateIsPostContent =
|
||||
template.template.type === 'mailpoet_email';
|
||||
const templateIsPostContent = template.type === 'mailpoet_email';
|
||||
|
||||
const postContent = template.template as unknown as EmailEditorPostType;
|
||||
|
||||
|
@@ -46,7 +46,7 @@ function TemplateListBox( {
|
||||
<div className="block-editor-block-patterns-list" role="listbox">
|
||||
{ templates.map( ( template ) => (
|
||||
<div
|
||||
key={ template.slug }
|
||||
key={ `${ template.slug }_${ template.id }` }
|
||||
className="block-editor-block-patterns-list__list-item"
|
||||
>
|
||||
<div
|
||||
|
Reference in New Issue
Block a user