fix(transclude): blockref detection
This commit is contained in:
parent
771c05ff18
commit
2a9290b3df
2 changed files with 4 additions and 3 deletions
|
@ -75,7 +75,7 @@ function renderTranscludes(
|
|||
const classNames = (node.properties?.className ?? []) as string[]
|
||||
if (classNames.includes("transclude")) {
|
||||
const inner = node.children[0] as Element
|
||||
const transcludeTarget = inner.properties["data-slug"] as FullSlug
|
||||
const transcludeTarget = (inner.properties["data-slug"] ?? slug) as FullSlug
|
||||
const page = componentData.allFiles.find((f) => f.slug === transcludeTarget)
|
||||
if (!page) {
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue