diff --git a/src/main.ts b/src/main.ts index 2b74728c..69a4536b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -366,7 +366,6 @@ export default class StatBlockPlugin extends Plugin { ); additionalParams = cache.frontmatter ?? {}; } - } const monster: Monster = Object.assign( {}, @@ -374,6 +373,8 @@ export default class StatBlockPlugin extends Plugin { this.bestiary.get(params.creature), additionalParams ); + console.log("🚀 ~ file: main.ts ~ line 377 ~ monster", monster.traits); + //TODO: The traits are breaking because it expects { name, desc }, not array. let traits, actions, legendary_actions, reactions; if (monster) { try { diff --git a/src/view/ui/Content.svelte b/src/view/ui/Content.svelte index b8248c8a..cfd05572 100644 --- a/src/view/ui/Content.svelte +++ b/src/view/ui/Content.svelte @@ -179,6 +179,10 @@ } case "traits": { const blocks: Trait[] = monster[item.properties[0]] as Trait[]; + console.log( + "🚀 ~ file: Content.svelte ~ line 182 ~ blocks", + blocks + ); if (!Array.isArray(blocks) || !blocks.length) return []; if (item.heading) { diff --git a/src/view/ui/Traits.svelte b/src/view/ui/Traits.svelte index da4e2db1..e9215b69 100644 --- a/src/view/ui/Traits.svelte +++ b/src/view/ui/Traits.svelte @@ -2,6 +2,7 @@ import TextContentHolder from "./TextContentHolder.svelte"; export let name: string; + console.log("🚀 ~ file: Traits.svelte ~ line 5 ~ name", name); export let desc: string; export let render: boolean;