Merge pull request #26131 from nextcloud/fix/initialstate-templates

Fix default missing initial state for templates
This commit is contained in:
Vincent Petry 2021-03-17 10:18:03 +01:00 committed by GitHub
commit ab5c19bb08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -294,7 +294,7 @@ class ViewController extends Controller {
if (class_exists(LoadViewer::class)) { if (class_exists(LoadViewer::class)) {
$this->eventDispatcher->dispatchTyped(new LoadViewer()); $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()); $this->initialState->provideInitialState('templates', $this->templateManager->listCreators());
$params = []; $params = [];

View File

@ -69,7 +69,7 @@ class InitialStateService implements IInitialStateService {
return; 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 { public function provideLazyInitialState(string $appName, string $key, Closure $closure): void {