Open oowekyala opened 2 weeks ago
This is due to changes in how views are loaded in latest obsidian. See here https://obsidian.md/changelog/2024-10-16-desktop-v1.7.4/ and here. https://docs.obsidian.md/Plugins/Guides/Understanding+deferred+views
I ended up disabling Calendar because of this. I believe it also affects the core Daily Notes plugin because I switched to that and still have Calendar disabled, but I don't remember now.
Describe the bug
The command "Open Weekly Note" crashes with "Uncaught TypeError" when the calendar view has not been opened yet.
Steps to reproduce
Nothing happens but an error is logged in the console:
It's this line: https://github.com/liamcain/obsidian-calendar-plugin/blob/ef3f2696da11aa1d11a272179caea062d6144640/src/main.ts#L63
The view field is undefined and this crashes the function.
Note that you have to start obsidian in such a state that the calendar view is not created on startup (i think). For instance if you open the calendar view then slide the pane out of view, the command works, presumably because the view still exists somewhere. However if you blend out the pane, then shutdown and restart obsidian, then that view is not created on startup.
Expected behavior
Weekly note is opened whether calendar view has been opened or not
Environment (please specify)
OS
Linux
Obsidian Version (e.g. v0.10.6)
(Settings → About → Current Version)
v1.7.4Calendar version 1.5.10
Thank you for this plugin!