add prisma cli to dependencies, make zod checks more permissive

This commit is contained in:
Zimeng Xiong
2025-11-23 06:56:45 -08:00
parent b864e82318
commit 997fa4af03
16 changed files with 195 additions and 395 deletions
+5 -4
View File
@@ -265,13 +265,14 @@ export const Editor: React.FC = () => {
if (!id) return;
try {
// Ensure we always have valid data structure
const persistableAppState = {
viewBackgroundColor: appState.viewBackgroundColor,
gridSize: appState.gridSize,
viewBackgroundColor: appState?.viewBackgroundColor || '#ffffff',
gridSize: appState?.gridSize || null,
};
const snapshot = latestElementsRef.current ?? elements;
const persistableElements = Array.from(snapshot);
const snapshot = latestElementsRef.current ?? elements ?? [];
const persistableElements = Array.isArray(snapshot) ? snapshot : [];
console.log("[Editor] Saving drawing", {
drawingId: id,