Merge pull request #23888 from nextcloud/fix/noid/only-fetch-jsconfig-when-used
Only build JSConfig in TemplateLayout when it is actually used
This commit is contained in:
commit
eb9faa7bdb
|
@ -194,6 +194,8 @@ class TemplateLayout extends \OC_Template {
|
||||||
$jsFiles = self::findJavascriptFiles(\OC_Util::$scripts);
|
$jsFiles = self::findJavascriptFiles(\OC_Util::$scripts);
|
||||||
$this->assign('jsfiles', []);
|
$this->assign('jsfiles', []);
|
||||||
if ($this->config->getSystemValue('installed', false) && $renderAs != TemplateResponse::RENDER_AS_ERROR) {
|
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(
|
$jsConfigHelper = new JSConfigHelper(
|
||||||
\OC::$server->getL10N('lib'),
|
\OC::$server->getL10N('lib'),
|
||||||
\OC::$server->query(Defaults::class),
|
\OC::$server->query(Defaults::class),
|
||||||
|
|
Loading…
Reference in New Issue