File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,15 @@ export default class APIManager {
3434 const dir = this . plugin . settings . storiesFolder
3535 const filePath = path . join ( dir , `${ hnItem . title } .md` )
3636
37- let stat = this . plugin . app . vault . adapter . stat ( dir )
37+ let stat = await this . plugin . app . vault . adapter . stat ( dir )
3838 if ( ! stat ) {
39- this . plugin . app . vault . createFolder ( dir )
39+ await this . plugin . app . vault . createFolder ( dir )
4040 }
4141
42- stat = this . plugin . app . vault . adapter . stat ( filePath )
42+ stat = await this . plugin . app . vault . adapter . stat ( filePath )
43+ console . log ( stat )
4344 if ( ! stat ) {
44- this . plugin . app . vault . create ( filePath , `[${ hnItem . title } ](${ hnItem . url } )` )
45+ await this . plugin . app . vault . create ( filePath , `[${ hnItem . title } ](${ hnItem . url } )` )
4546 new Notice ( `Story saved: ${ hnItem . title } ` )
4647 }
4748 }
You can’t perform that action at this time.
0 commit comments