mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-31 01:40:05 +08:00
Fixed tags
This commit is contained in:
9
main.ts
9
main.ts
@@ -99,15 +99,8 @@ export default class ObsidianSyncNotionPlugin extends Plugin {
|
||||
const nowFile = app.workspace.getActiveFile();
|
||||
const { allowTags } = this.settings;
|
||||
let tags = []
|
||||
let fileTags = app.metadataCache.getFileCache(nowFile)?.frontmatter?.tags;
|
||||
console.log(nowFile, fileTags)
|
||||
console.log(app.metadataCache.getFileCache(nowFile))
|
||||
if(allowTags && !fileTags) {
|
||||
new Notice(langConfig["set-tags-fail"]);
|
||||
return
|
||||
}
|
||||
try {
|
||||
if (app.metadataCache.getFileCache(nowFile).tags !== undefined && allowTags) {
|
||||
if(allowTags) {
|
||||
tags = app.metadataCache.getFileCache(nowFile).frontmatter.tags;
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user