Merge pull request #26166 from nextcloud/backport/26131/stable21
[stable21] Fix default missing initial state for templates
This commit is contained in:
commit
aa8a31b3ec
|
@ -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 = [];
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue