Browse Source

Fix default missing initial state for templates

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
tags/v22.0.0beta1
John Molakvoæ (skjnldsv) 3 years ago
parent
commit
223fe2aae6
No account linked to committer's email address

+ 1
- 1
apps/files/lib/Controller/ViewController.php View File

@@ -294,7 +294,7 @@ class ViewController extends Controller {
if (class_exists(LoadViewer::class)) {
$this->eventDispatcher->dispatchTyped(new LoadViewer());
}
$this->initialState->provideInitialState('templates_path', $this->templateManager->hasTemplateDirectory() ? $this->templateManager->getTemplatePath() : null);
$this->initialState->provideInitialState('templates_path', $this->templateManager->hasTemplateDirectory() ? $this->templateManager->getTemplatePath() : false);
$this->initialState->provideInitialState('templates', $this->templateManager->listCreators());

$params = [];

+ 1
- 1
lib/private/InitialStateService.php View File

@@ -69,7 +69,7 @@ class InitialStateService implements IInitialStateService {
return;
}

$this->logger->warning('Invalid data provided to provideInitialState by ' . $appName);
$this->logger->warning('Invalid '. $key . ' data provided to provideInitialState by ' . $appName);
}

public function provideLazyInitialState(string $appName, string $key, Closure $closure): void {

Loading…
Cancel
Save