[FEAT] Fix TS bug
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user