[FEAT] Fix TS bug

This commit is contained in:
2026-01-02 01:46:23 +01:00
parent 68d15721ea
commit bc9ce86d10

View File

@@ -66,8 +66,9 @@ export const useProjectManager = () => {
// Create new project if none exists
await projectStore.createProject(name, data);
// After creating, we should update route to include ID so subsequent saves update it
if (projectStore.currentProject) {
router.replace({ name: 'editor', params: { id: projectStore.currentProject.id } });
const newProject = projectStore.currentProject as Project | null;
if (newProject) {
router.replace({ name: 'editor', params: { id: newProject.id } });
}
}
} catch (e) {