From c62d03bae314acaac2250a252622872112b09d89 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Tue, 15 Jun 2021 16:42:36 +0200
Subject: [PATCH] Don't define an undefined scoped element

This is a bug, but the mixin just ignored undefined here.
The next version will be stricter and raises an error in this case.
---
 packages/common/dbp-common-demo.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/packages/common/dbp-common-demo.js b/packages/common/dbp-common-demo.js
index c1c8f0c6..4e58093a 100644
--- a/packages/common/dbp-common-demo.js
+++ b/packages/common/dbp-common-demo.js
@@ -13,16 +13,21 @@ export class DbpCommonDemo extends ScopedElementsMixin(LitElement) {
     }
 
     static get scopedElements() {
-        return {
+        let elements = {
             'dbp-icon': Icon,
             'dbp-mini-spinner': MiniSpinner,
             'dbp-spinner': Spinner,
             'dbp-button': Button,
             'dbp-loading-button': LoadingButton,
-            'dbp-auth': customElements.get('dbp-auth'),
             'dbp-inline-notification': InlineNotification,
             'dbp-translated': Translated,
         };
+
+        if (customElements.get('dbp-auth')) {
+            elements['dbp-auth'] = customElements.get('dbp-auth');
+        }
+
+        return elements;
     }
 
     static get properties() {
-- 
GitLab