Skip to content

Commit

Permalink
Fix admin when no visual config
Browse files Browse the repository at this point in the history
  • Loading branch information
irdkwmnsb committed Apr 18, 2024
1 parent 6eeda3c commit 30f3a43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/frontend/admin/src/services/controlsWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export class ControlsWidgetService extends AbstractWidgetImpl {
loadPresets() {
return createApiGet(BACKEND_ROOT)("/api/overlay/visualConfig.json")
.then(c => {
const hiddenElements = c["ADMIN_HIDE_CONTROL"] ?? [];
return c["ADMIN_HIDE_CONTROL"] ?? [];
}).catch(() => {
return [];
}).then((hiddenElements) => {
const ce = controlElements.filter(e => !hiddenElements.includes(e.id));
return Promise.all(
ce.map(({ id, text }) =>
Expand Down

0 comments on commit 30f3a43

Please sign in to comment.