mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
fix: 🐛 fix crash when no calendarRoot
This commit is contained in:
@@ -213,6 +213,10 @@ export default class CalendarWidget extends RightDropdownButtonWidget {
|
||||
|
||||
private async getWeekNoteEnable() {
|
||||
const noteId = await server.get<string[]>(`search/${encodeURIComponent('#calendarRoot')}`);
|
||||
if (noteId.length === 0) {
|
||||
this.weekNoteEnable = false;
|
||||
return;
|
||||
}
|
||||
const noteAttributes = await server.get<BAttribute[]>(`notes/${noteId}/attributes`);
|
||||
|
||||
for (const attribute of noteAttributes) {
|
||||
|
||||
Reference in New Issue
Block a user