From 0b857ef444f68f3ad3861014e6042a9637eb85c3 Mon Sep 17 00:00:00 2001 From: znetsixe Date: Tue, 19 May 2026 15:59:19 +0200 Subject: [PATCH] fix: align logging.enabled default to schema (true) dashboardapiConfig.json declares `logging.enabled.default: true` but: - dashboardapi.html defaulted `enableLog: false` - src/specificClass.js `_buildConfig` used `Boolean(...)` which coerced undefined to false, overriding the schema default. Aligned both to the schema: HTML default = true; _buildConfig now uses `?? true` so an unspecified config follows the schema. Co-Authored-By: Claude Opus 4.7 (1M context) --- dashboardapi.html | 2 +- src/specificClass.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboardapi.html b/dashboardapi.html index 18a4f59..1f23c81 100644 --- a/dashboardapi.html +++ b/dashboardapi.html @@ -7,7 +7,7 @@ color: '#4f8582', defaults: { name: { value: '' }, - enableLog: { value: false }, + enableLog: { value: true }, logLevel: { value: 'info' }, protocol: { value: 'http' }, diff --git a/src/specificClass.js b/src/specificClass.js index 39c076e..7fdebfd 100644 --- a/src/specificClass.js +++ b/src/specificClass.js @@ -55,7 +55,7 @@ class DashboardApi { general: { name: config?.general?.name || 'dashboardapi', logging: { - enabled: Boolean(config?.general?.logging?.enabled), + enabled: config?.general?.logging?.enabled ?? true, logLevel: config?.general?.logging?.logLevel || 'info', }, },