File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "id" : " obsidian-meta-bind-plugin" ,
33 "name" : " Meta Bind Plugin" ,
4- "version" : " 0.1.5 " ,
4+ "version" : " 0.1.6 " ,
55 "minAppVersion" : " 0.14.0" ,
66 "description" : " This plugin can create input fields inside your notes and bind them to metadata fields." ,
77 "author" : " Moritz Jung" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " obsidian-meta-bind-plugin" ,
3- "version" : " 0.1.5 " ,
3+ "version" : " 0.1.6 " ,
44 "description" : " This plugin can create input fields inside your notes and bind them to metadata fields." ,
55 "main" : " main.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -123,8 +123,12 @@ export default class MetaBindPlugin extends Plugin {
123123
124124 let fileContent : string = await this . app . vault . read ( file ) ;
125125 const regExp = new RegExp ( '^(---)\\n[\\s\\S]*\\n---' ) ;
126- let frontMatter = regExp . exec ( fileContent ) [ 0 ] ;
127- if ( frontMatter === null ) {
126+ let frontMatterRegExpResult = regExp . exec ( fileContent ) ;
127+ if ( ! frontMatterRegExpResult ) {
128+ return { } ;
129+ }
130+ let frontMatter = frontMatterRegExpResult [ 0 ] ;
131+ if ( ! frontMatter ) {
128132 return { } ;
129133 }
130134 // console.log(frontMatter);
You can’t perform that action at this time.
0 commit comments