From 9403668ac405ade078634e6c266c4af279e73376 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Tue, 19 Jul 2022 12:39:39 +0300 Subject: [PATCH] feedback --- .../src/components/add-new-template/new-template.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/edit-site/src/components/add-new-template/new-template.js b/packages/edit-site/src/components/add-new-template/new-template.js index 0529a93b5bd19..f491b2000ce8e 100644 --- a/packages/edit-site/src/components/add-new-template/new-template.js +++ b/packages/edit-site/src/components/add-new-template/new-template.js @@ -257,11 +257,7 @@ function useMissingTemplates( // with the check if it has available specific item to create a // template for. if ( matchIndex > -1 ) { - enhancedMissingDefaultTemplateTypes.splice( - matchIndex, - 1, - menuItem - ); + enhancedMissingDefaultTemplateTypes[ matchIndex ] = menuItem; } else { enhancedMissingDefaultTemplateTypes.push( menuItem ); }