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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent failures at render time (cannot read property 'tags' of undefined #11

Closed
liamcain opened this issue Feb 13, 2021 · 2 comments
Assignees
Labels
bug Something isn't working.

Comments

@liamcain
Copy link

Hi, sorry for filing all the tickets. I'm really just playing around and stress testing it a bit 馃槃


More than once I've run into the following stacktrace while switching to preview:

2index.html:9045 Uncaught (in promise) TypeError: Cannot read property 'tags' of undefined
    at TagIndex.eval (eval at <anonymous> (app.js:1), <anonymous>:9045:31)
    at step (eval at <anonymous> (app.js:1), <anonymous>:68:23)
    at Object.eval [as next] (eval at <anonymous> (app.js:1), <anonymous>:49:53)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:42:71)
    at new Promise (<anonymous>)
    at __awaiter (eval at <anonymous> (app.js:1), <anonymous>:38:12)
    at TagIndex.reloadFile (eval at <anonymous> (app.js:1), <anonymous>:9038:16)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:8860:90)
    at step (eval at <anonymous> (app.js:1), <anonymous>:68:23)
    at Object.eval [as next] (eval at <anonymous> (app.js:1), <anonymous>:49:53)

Most recently it was while building the following dataview (not sure if it's related though):

task from ""
where file.day
sort file.day desc
@blacksmithgu
Copy link
Owner

Interesting. Looks like some files have no metadata in the Obsidian cache, so need to add a null check. Probably worth revisiting my index code and add some extra null safety pre-emptively. Will be fixed in 0.1.6.

@blacksmithgu blacksmithgu added the bug Something isn't working. label Feb 14, 2021
@blacksmithgu blacksmithgu self-assigned this Feb 14, 2021
@blacksmithgu
Copy link
Owner

I believe I've fixed most of these; it was an issue with how I parsed tags (I did it in different ways when a page was first indexed, and when it was later re-indexed due to a changed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

2 participants