We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 446ba44 commit ccb1936Copy full SHA for ccb1936
src/app/gbr-preset/plugins/frontmatter.ts
@@ -37,7 +37,7 @@ export function readMatter(): Transformer {
37
38
export function getTitle(): Transformer {
39
return (tree: Root, file: VFile) => {
40
- if(tree.children[0].type === 'heading' && tree.children[0].depth !== 1 ){
+ if(tree.children[0] && tree.children[0].type === 'heading' && tree.children[0].depth !== 1 ){
41
tree.children[0].depth = 1;
42
}
43
0 commit comments