diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index 81695247af0d2289e8ae79968120b3b7cf862f7d..96f8f38877ce8dd7635da2a09e004d6bdd67d2ad 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -194,6 +194,8 @@ class TemplateLayout extends \OC_Template {
 		$jsFiles = self::findJavascriptFiles(\OC_Util::$scripts);
 		$this->assign('jsfiles', []);
 		if ($this->config->getSystemValue('installed', false) && $renderAs != TemplateResponse::RENDER_AS_ERROR) {
+			// this is on purpose outside of the if statement below so that the initial state is prefilled (done in the getConfig() call)
+			// see https://github.com/nextcloud/server/pull/22636 for details
 			$jsConfigHelper = new JSConfigHelper(
 				\OC::$server->getL10N('lib'),
 				\OC::$server->query(Defaults::class),