Skip to content

Commit

Permalink
Merge pull request #22650 from nextcloud/fix/noid/fix-psalm-warning
Browse files Browse the repository at this point in the history
Only load viewer in settings if the viewer app is enabled
  • Loading branch information
MorrisJobke authored Sep 7, 2020
2 parents 6f4ea73 + ce1e873 commit 0e6344f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/settings/lib/Settings/Personal/ServerDevNotice.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public function getForm() {

$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')) {
$this->eventDispatcher->dispatch(LoadViewer::class, new LoadViewer());
Expand Down

0 comments on commit 0e6344f

Please sign in to comment.