Skip to content

Commit

Permalink
fix: template name is uuid whem there is no template property in block
Browse files Browse the repository at this point in the history
  • Loading branch information
stdword committed Apr 2, 2023
1 parent 30600eb commit 982d984
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ async function getTemplateBlock(
accessedVia = 'page'

name = templateRef.value as string
}
else {
} else {
[ templateBlock, accessedVia ] = await getBlock(
templateRef, {
byProperty: PropertiesUtils.templateProperty,
Expand All @@ -91,6 +90,9 @@ async function getTemplateBlock(
{templateRef},
)

if (!name)
name = templateBlock.uuid

return [ templateBlock, name, accessedVia ]
}

Expand Down

0 comments on commit 982d984

Please sign in to comment.