From 280d88737ef02f10e4a7cdcea9e10ffc3592260e Mon Sep 17 00:00:00 2001 From: Andrey Borysenko Date: Mon, 23 Dec 2024 15:12:21 +0000 Subject: [PATCH] fix(initial-state): correct defaultDaemonConfig initial state (#473) There is was missing check if no deploy daemons configured, null value produced warning logs. Resolves: https://github.com/nextcloud/app_api/issues/472 Signed-off-by: Andrey Borysenko --- lib/Service/ExAppsPageService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Service/ExAppsPageService.php b/lib/Service/ExAppsPageService.php index e5fede92..5d7d9f5a 100644 --- a/lib/Service/ExAppsPageService.php +++ b/lib/Service/ExAppsPageService.php @@ -58,6 +58,8 @@ public function provideAppApiState(IInitialState $initialState): void { } $initialState->provideInitialState('defaultDaemonConfigAccessible', $daemonConfigAccessible); - $initialState->provideInitialState('defaultDaemonConfig', $defaultDaemonConfig); + if ($defaultDaemonConfig !== null) { + $initialState->provideInitialState('defaultDaemonConfig', $defaultDaemonConfig); + } } }