do not break personal settings page is viewer is not there

Signed-off-by: Simon L <szaimen@e.mail.de>
pull/43435/head
Simon L 2 years ago
parent ed3a1e7538
commit b0c57ed65f
  1. 7
      apps/settings/lib/Settings/Personal/ServerDevNotice.php

@ -78,11 +78,8 @@ class ServerDevNotice implements ISettings {
$hasInitialState = false;
// viewer is default enabled and this makes a zero-cost assertion for Psalm
assert(class_exists(LoadViewer::class));
// If the Reasons to use Nextcloud.pdf file is here, let's init Viewer
if ($userFolder->nodeExists('Reasons to use Nextcloud.pdf')) {
// If the Reasons to use Nextcloud.pdf file is here, let's init Viewer, also check that Viewer is there
if (class_exists(LoadViewer::class) && $userFolder->nodeExists('Reasons to use Nextcloud.pdf')) {
$this->eventDispatcher->dispatch(LoadViewer::class, new LoadViewer());
$hasInitialState = true;
}

Loading…
Cancel
Save