From 15bba899c326a30d21fd7d1bdbaec4afe44e47f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 12 Jun 2022 03:25:56 +0200 Subject: Replace some .tagName with instanceof. --- static/components/tab-group-element.ts | 2 +- static/components/vevent.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'static/components') diff --git a/static/components/tab-group-element.ts b/static/components/tab-group-element.ts index 5cfeab2d..e90997e9 100644 --- a/static/components/tab-group-element.ts +++ b/static/components/tab-group-element.ts @@ -174,7 +174,7 @@ class TabGroupElement extends ComponentVEvent { /* returns our rrule tab if we have one */ has_rrule_tab(): Element | false { for (let child of this.children) { - if ((child.firstChild! as HTMLElement).tagName.toLowerCase() === 'vevent-edit-rrule') { + if (child.firstChild! instanceof EditRRule) { return child; } } diff --git a/static/components/vevent.ts b/static/components/vevent.ts index 2193eabc..5852a2ff 100644 --- a/static/components/vevent.ts +++ b/static/components/vevent.ts @@ -19,7 +19,6 @@ abstract class ComponentVEvent extends HTMLElement { let real_uid; - // console.log(this.tagName); if (uid) { // console.log('Got UID directly'); real_uid = uid; -- cgit v1.2.3