Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when the day/created frontmatter entry is wonky, a scary warning shows in the console #30

Open
robotbrad opened this issue Jul 28, 2023 · 1 comment

Comments

@robotbrad
Copy link
Member

image
Screenshot from 2023-07-26 21-49-30

the function

        const getEntryDate = (entry: TFile): string => {
            const cache = this.app.metadataCache.getFileCache(entry);
            return moment(cache?.frontmatter?.day ??
                cache?.frontmatter?.created ??
                entry.stat.ctime).format("YYYY-MM-DD");
        }

needs to handle something not a date in frontmatter.day/created

@robotbrad
Copy link
Member Author

suggested fixes:

  • handle, print out file name and warning, allow error to go to the console
  • pre-filter out excluded files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant