add sqlite compatibility + fix whitespace bug collections
This commit is contained in:
@@ -20,12 +20,15 @@ export default async function postLink(
|
||||
};
|
||||
}
|
||||
|
||||
link.collection.name = link.collection.name.trim();
|
||||
|
||||
// This has to move above we assign link.collection.name
|
||||
// Because if the link is null (write then delete text on collection)
|
||||
// It will try to do trim on empty string and will throw and error, this prevents it.
|
||||
if (!link.collection.name) {
|
||||
link.collection.name = "Unnamed Collection";
|
||||
}
|
||||
|
||||
link.collection.name = link.collection.name.trim();
|
||||
|
||||
if (link.collection.id) {
|
||||
const collectionIsAccessible = (await getPermission(
|
||||
userId,
|
||||
|
||||
Reference in New Issue
Block a user