From 18df59056e03f3b46b2ff57753bad90ca6dd6c08 Mon Sep 17 00:00:00 2001
From: Maximilian Giller <m.giller@tu-bs.de>
Date: Tue, 8 Feb 2022 10:24:45 +0100
Subject: [PATCH] Adjusted for different space format

---
 editor/js/interactions.js | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/editor/js/interactions.js b/editor/js/interactions.js
index 5fc1796..5a72839 100644
--- a/editor/js/interactions.js
+++ b/editor/js/interactions.js
@@ -20,14 +20,13 @@ function loadSpacesList() {
     var selectContainer = jQuery("#space-id-select");
     selectContainer.empty();
     listAllSpaces().then((spaces) => {
-        Object.keys(spaces).forEach(space_id => {
+        spaces.forEach(space => {
             var selectedTxt = "";
-            var space = spaces[space_id];
-            if (space_id === SPACE) {
+            if (space.space_id === SPACE) {
                 selectedTxt = "selected ";
             }
             
-            var child = "<option " + selectedTxt + "value=\"" + space_id + "\" title=\"" + space.description + "\">" + space.name + "</option>";
+            var child = "<option " + selectedTxt + "value=\"" + space.space_id + "\" title=\"" + space.description + "\">" + space.name + "</option>";
             selectContainer.append(child);
         });
     });
-- 
GitLab