From 5238888ecf108e414ca5f7643508e95ffd27232c Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Wed, 1 Sep 2021 13:23:39 -0400 Subject: [PATCH] Fix sonarcloud bug --- src/components/syncPlay/ui/groupSelectionMenu.js | 10 +++++++--- src/components/syncPlay/ui/settings/SettingsEditor.js | 2 -- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/syncPlay/ui/groupSelectionMenu.js b/src/components/syncPlay/ui/groupSelectionMenu.js index a6bbd0516..8a5cb32a8 100644 --- a/src/components/syncPlay/ui/groupSelectionMenu.js +++ b/src/components/syncPlay/ui/groupSelectionMenu.js @@ -156,9 +156,13 @@ class GroupSelectionMenu { } else if (id == 'leave-group') { apiClient.leaveSyncPlayGroup(); } else if (id == 'settings') { - new SyncPlaySettingsEditor(apiClient, SyncPlay.Manager.getTimeSyncCore(), { - groupInfo: groupInfo - }); + new SyncPlaySettingsEditor(apiClient, SyncPlay.Manager.getTimeSyncCore(), { groupInfo: groupInfo }) + .embed() + .catch(error => { + if (error) { + console.error('Error creating SyncPlay settings editor', error); + } + }); } }).catch((error) => { if (error) { diff --git a/src/components/syncPlay/ui/settings/SettingsEditor.js b/src/components/syncPlay/ui/settings/SettingsEditor.js index d476e0e50..049767809 100644 --- a/src/components/syncPlay/ui/settings/SettingsEditor.js +++ b/src/components/syncPlay/ui/settings/SettingsEditor.js @@ -37,8 +37,6 @@ class SettingsEditor { this.tabNames = []; this.tabs = {}; - - this.embed(); } insertBefore(newNode, existingNode) {