1.13.0 fix error when adding new calendar

- skip calendars with empty URLs during fetch
- prevents "not found" error when creating new calendar entry
- fixes #58
This commit is contained in:
Michalis Efstratiadis 2026-02-02 15:41:22 +02:00
parent 99d26a9508
commit 2c58e5bf54
No known key found for this signature in database
4 changed files with 7 additions and 5 deletions

View file

@ -1,7 +1,7 @@
{
"id": "memochron",
"name": "MemoChron",
"version": "1.12.1",
"version": "1.13.0",
"minAppVersion": "1.8.9",
"description": "Calendar integration and note creation with support for public iCalendar URLs",
"author": "Michalis Efstratiadis",

View file

@ -1,6 +1,6 @@
{
"name": "memochron",
"version": "1.11.0",
"version": "1.13.0",
"description": "Calendar integration and note creation plugin for Obsidian",
"main": "main.js",
"scripts": {

View file

@ -47,7 +47,8 @@ export class CalendarService {
return this.events;
}
const enabledSources = sources.filter((source) => source.enabled);
// Filter to only enabled sources that have a URL configured
const enabledSources = sources.filter((source) => source.enabled && source.url?.trim());
if (enabledSources.length === 0) {
this.events = [];
@ -179,7 +180,7 @@ export class CalendarService {
private scheduleBackgroundRefresh(sources: CalendarSource[]) {
// Only schedule a refresh if the cache has actually expired
// This respects the refresh interval setting
const enabledSources = sources.filter((source) => source.enabled);
const enabledSources = sources.filter((source) => source.enabled && source.url?.trim());
if (this.needsRefresh(enabledSources, false)) {
setTimeout(() => this.fetchCalendars(sources, true), 100);
}

View file

@ -39,5 +39,6 @@
"1.11.0": "1.8.9",
"1.11.1": "1.8.9",
"1.12.0": "1.8.9",
"1.12.1": "1.8.9"
"1.12.1": "1.8.9",
"1.13.0": "1.8.9"
}