assign default values
This commit is contained in:
parent
f9796be7f2
commit
4054c54e57
2 changed files with 9 additions and 7 deletions
|
|
@ -7,9 +7,11 @@ export const useProjectsStore = defineStore('projects', () => {
|
|||
const projects = ref(null);
|
||||
|
||||
const currentProjects = computed(() => {
|
||||
return projects.value
|
||||
.filter((project) => project.status === 'listed')
|
||||
.sort((a, b) => new Date(b.modified) - new Date(a.modified));
|
||||
return (
|
||||
projects.value
|
||||
.filter((project) => project.status === 'listed')
|
||||
.sort((a, b) => new Date(b.modified) - new Date(a.modified)) || []
|
||||
);
|
||||
});
|
||||
|
||||
const draftProjects = computed(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue