Skip to content

Commit ccb1936

Browse files
committed
Debug getTitle.
1 parent 446ba44 commit ccb1936

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/gbr-preset/plugins/frontmatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function readMatter(): Transformer {
3737

3838
export function getTitle(): Transformer {
3939
return (tree: Root, file: VFile) => {
40-
if(tree.children[0].type === 'heading' && tree.children[0].depth !== 1 ){
40+
if(tree.children[0] && tree.children[0].type === 'heading' && tree.children[0].depth !== 1 ){
4141
tree.children[0].depth = 1;
4242
}
4343

0 commit comments

Comments
 (0)