mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(core): provide valid initial state also on public templates
The `core apps` initial state should be an array of apps currently available. But for public templates when there is no navigation entry the array would contain `[null]` instead of `[]` which breaks some use cases (e.g. apps that rely on some nextcloud-vue versions). Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
6afd7bfcf6
commit
767b6c25c7
1 changed files with 2 additions and 1 deletions
|
|
@ -163,7 +163,8 @@ class TemplateLayout {
|
|||
$page->assign('appid', $appId);
|
||||
$page->assign('bodyid', 'body-public');
|
||||
|
||||
$this->initialState->provideInitialState('core', 'apps', [$this->navigationManager->get($appId)]);
|
||||
$currentAppData = $this->navigationManager->get($appId);
|
||||
$this->initialState->provideInitialState('core', 'apps', $currentAppData === null ? [] : [$currentAppData]);
|
||||
|
||||
// Set logo link target
|
||||
$logoUrl = $this->config->getSystemValueString('logo_url', '');
|
||||
|
|
|
|||
Loading…
Reference in a new issue