From 275512d4436be5707c66cf1698ffe8ea28b40e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophyl=20Hoguet?= <61246905+THoguet@users.noreply.github.com> Date: Thu, 6 Nov 2025 23:58:42 +0100 Subject: [PATCH] Update src/app/services/calendar-settings-service.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/app/services/calendar-settings-service.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/app/services/calendar-settings-service.ts b/src/app/services/calendar-settings-service.ts index 8bf82c3..716a449 100644 --- a/src/app/services/calendar-settings-service.ts +++ b/src/app/services/calendar-settings-service.ts @@ -48,10 +48,19 @@ export class CalendarSettingsService { })); } - get(id: string): WritableSignal { - return this.signals.get(id)!; + /** + * Returns the signal for the given setting ID, or undefined if not found. + */ + get(id: string): WritableSignal | undefined { + return this.signals.get(id); } + /** + * Returns true if the setting with the given ID exists. + */ + has(id: string): boolean { + return this.signals.has(id); + } getDescription(id: string): string { return this.definitions.get(id)?.description ?? ''; }