chore: snapshot before performance optimization

This commit is contained in:
Sepehr Ramezani
2026-04-17 21:14:43 +02:00
parent b6a548acd8
commit 2eceb32fd4
95 changed files with 4357 additions and 1942 deletions

View File

@@ -34,7 +34,7 @@ export async function POST() {
allNotes.forEach(note => {
if (note.labels) {
try {
const parsed: string[] = JSON.parse(note.labels)
const parsed: string[] = Array.isArray(note.labels) ? (note.labels as string[]) : []
if (Array.isArray(parsed)) {
parsed.forEach(l => {
if (l && l.trim()) labelsInNotes.add(l.trim())
@@ -81,7 +81,7 @@ export async function POST() {
allNotes.forEach(note => {
if (note.labels) {
try {
const parsed: string[] = JSON.parse(note.labels)
const parsed: string[] = Array.isArray(note.labels) ? (note.labels as string[]) : []
if (Array.isArray(parsed)) {
parsed.forEach(l => usedLabelsSet.add(l.toLowerCase()))
}