fix: wrap revalidatePath in try-catch to prevent save 500, add --no-cache to deploy script
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m33s

This commit is contained in:
Antigravity
2026-05-09 20:43:11 +00:00
parent 4730ab6117
commit 5a6ec4808f
2 changed files with 4 additions and 5 deletions

View File

@@ -913,9 +913,8 @@ export async function updateNote(id: string, data: {
console.log('[updateNote] Structural check — data fields:', Object.keys(data), '| isStructural:', isStructuralChange) console.log('[updateNote] Structural check — data fields:', Object.keys(data), '| isStructural:', isStructuralChange)
if (!options?.skipRevalidation) { if (!options?.skipRevalidation) {
// Always revalidate note individual page on content changes so UI reflects saved data try { revalidatePath(`/note/${id}`) } catch {}
revalidatePath(`/note/${id}`) try { revalidatePath('/') } catch {}
revalidatePath('/')
} }
if (isStructuralChange) { if (isStructuralChange) {

View File

@@ -103,8 +103,8 @@ case $COMMAND in
echo "🔄 Updating application..." echo "🔄 Updating application..."
echo "Pulling latest changes..." echo "Pulling latest changes..."
git pull git pull
echo "Rebuilding..." echo "Rebuilding (no cache)..."
docker compose build docker compose build --no-cache
echo "Restarting..." echo "Restarting..."
docker compose down docker compose down
docker compose up -d docker compose up -d