File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
apps/settings/lib/Settings/Personal Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -78,11 +78,11 @@ public function getForm(): TemplateResponse {
7878
7979 $ hasInitialState = false ;
8080
81- // viewer is default enabled and this makes a zero-cost assertion for Psalm
82- assert (class_exists (LoadViewer::class));
83-
84- // If the Reasons to use Nextcloud.pdf file is here, let's init Viewer
85- if ( $ userFolder -> nodeExists ( ' Reasons to use Nextcloud.pdf ' )) {
81+ // If the Reasons to use Nextcloud.pdf file is here, let's init Viewer, also check that Viewer is there
82+ if (class_exists (LoadViewer::class) && $ userFolder -> nodeExists ( ' Reasons to use Nextcloud.pdf ' )) {
83+ /**
84+ * @psalm-suppress UndefinedClass, InvalidArgument
85+ */
8686 $ this ->eventDispatcher ->dispatch (LoadViewer::class, new LoadViewer ());
8787 $ hasInitialState = true ;
8888 }
You can’t perform that action at this time.
0 commit comments