From 93d417b442a4ad6d0daf63b4d4774399130a3af8 Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Fri, 9 Feb 2024 13:36:50 +1100 Subject: [PATCH] Template Part: Fix site editor error when loading with list view set to always display (#58868) Co-authored-by: andrewserong Co-authored-by: tellthemachines --- packages/block-library/src/template-part/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/template-part/index.js b/packages/block-library/src/template-part/index.js index 6e77fcf8044297..20976e231d811c 100644 --- a/packages/block-library/src/template-part/index.js +++ b/packages/block-library/src/template-part/index.js @@ -43,7 +43,9 @@ export const settings = { return; } - return decodeEntities( entity.title ) || capitalCase( entity.slug ); + return ( + decodeEntities( entity.title ) || capitalCase( entity.slug || '' ) + ); }, edit, };