From ecdb4b7eeb42dc859cfd6aa31634b423b72c50bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 15 Nov 2021 00:47:13 +0100 Subject: Rework some drawing and how calendar is accessed. --- static/components/vevent.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'static/components/vevent.ts') diff --git a/static/components/vevent.ts b/static/components/vevent.ts index de232794..d957c7c8 100644 --- a/static/components/vevent.ts +++ b/static/components/vevent.ts @@ -26,6 +26,7 @@ class ComponentVEvent extends HTMLElement { } this.uid = real_uid; + this.dataset.uid = uid; vcal_objects.get(this.uid)?.register(this); @@ -36,9 +37,9 @@ class ComponentVEvent extends HTMLElement { } connectedCallback() { - let uid, v; - if ((uid = this.dataset.uid)) { - v = vcal_objects.get(uid) + let uid = this.dataset.uid + if (uid) { + let v = vcal_objects.get(uid) if (v) this.redraw(v); } } -- cgit v1.2.3