Fix default missing initial state for templates

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
pull/26131/head
John Molakvoæ (skjnldsv) 5 years ago
parent 69c4578b5b
commit 223fe2aae6
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
  1. 2
      apps/files/lib/Controller/ViewController.php
  2. 2
      lib/private/InitialStateService.php

@ -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 = [];

@ -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