♻️ (stacked note) simplify ini

This commit is contained in:
2021-03-16 23:47:56 +01:00
parent 996d10b174
commit baf7973414

View File

@@ -10,15 +10,13 @@ export const useQueryStackedNotes = () => {
const { query } = useRoute() const { query } = useRoute()
if (initial) { if (initial) {
initial = false initial = false
stackedNotes.value = query.stackedNotes stackedNotes.value = Array.isArray(query.stackedNotes)
? Array.isArray(query.stackedNotes)
? (query.stackedNotes ? (query.stackedNotes
.map((n) => n?.toString()) .map((n) => n?.toString())
.filter((n) => !!n) as string[]) .filter((n) => !!n) as string[])
: ([query.stackedNotes] : ([query.stackedNotes]
.map((n) => n?.toString()) .map((n) => n?.toString())
.filter((n) => !!n) as string[]) .filter((n) => !!n) as string[])
: ([] as string[])
} }
return { return {