Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
Don't allow unknown display modes
Browse files Browse the repository at this point in the history
  • Loading branch information
Prospector committed Nov 22, 2023
1 parent d6cd34c commit d06a4bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion pages/search/[searchProjectType].vue
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,12 @@
<div
id="search-results"
class="project-list"
:class="'display-mode--' + cosmetics.searchDisplayMode[projectType.id]"
:class="
'display-mode--' +
(['list', 'grid'].includes(cosmetics.searchDisplayMode[projectType.id])
? cosmetics.searchDisplayMode[projectType.id]
: 'list')
"
role="list"
aria-label="Search results"
>
Expand Down
7 changes: 6 additions & 1 deletion pages/user/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@
<div
v-if="projects.length > 0"
class="project-list"
:class="'display-mode--' + cosmetics.searchDisplayMode.user"
:class="
'display-mode--' +
(['list', 'grid'].includes(cosmetics.searchDisplayMode.user)
? cosmetics.searchDisplayMode.user
: 'list')
"
>
<ProjectCard
v-for="project in (route.params.projectType !== undefined
Expand Down

0 comments on commit d06a4bb

Please sign in to comment.