fix: Cannot create collection if all collections deleted
This commit is contained in:
@ -74,7 +74,10 @@ router.post("collections.create", auth(), async (ctx) => {
|
||||
);
|
||||
}
|
||||
} else {
|
||||
index = fractionalIndex(null, collections[0].index);
|
||||
index = fractionalIndex(
|
||||
null,
|
||||
collections.length ? collections[0].index : null
|
||||
);
|
||||
}
|
||||
|
||||
index = await removeIndexCollision(user.teamId, index);
|
||||
|
Reference in New Issue
Block a user