From 3ddbd37ade2e03e4fc3a6f5ba52234bc286fded3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 13 Dec 2021 02:26:36 +0100 Subject: Made VEventComponent template optional. --- static/components/vevent-edit.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'static/components/vevent-edit.ts') diff --git a/static/components/vevent-edit.ts b/static/components/vevent-edit.ts index 5c482882..ee368296 100644 --- a/static/components/vevent-edit.ts +++ b/static/components/vevent-edit.ts @@ -17,6 +17,10 @@ class ComponentEdit extends ComponentVEvent { constructor(uid?: string) { super(uid); + if (!this.template) { + throw 'vevent-edit template required'; + } + let frag = this.template.content.cloneNode(true) as DocumentFragment let body = frag.firstElementChild! this.replaceChildren(body); -- cgit v1.2.3