From 2ae3cb93f896b03f829e73bf88110574c64979c8 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Tue, 14 Apr 2020 12:24:03 +0200
Subject: [PATCH] Handle missing 'attributes' in topic json

Default to an empty list
---
 packages/app-shell/src/index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/app-shell/src/index.js b/packages/app-shell/src/index.js
index dae8484d..6f1288b7 100644
--- a/packages/app-shell/src/index.js
+++ b/packages/app-shell/src/index.js
@@ -601,7 +601,7 @@ class VPUApp extends LitElement {
 
         const elm = document.createElement(activity.element);
 
-        for(const key of this.topic.attributes) {
+        for(const key of this.topic.attributes || []) {
             let value = sessionStorage.getItem('vpu-attr-' + key);
             if (value !== null) {
                 elm.setAttribute(key, value);
-- 
GitLab