fix: creating tags with leading/traling slashes (#12778)

This commit is contained in:
Daniel Dietzler 2024-09-18 21:25:13 +02:00 committed by GitHub
parent caa9b1a041
commit 96516ae4b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 1 deletions

View file

@ -8,7 +8,7 @@ export const upsertTags = async (repository: ITagRepository, { userId, tags }: U
const results: TagEntity[] = [];
for (const tag of tags) {
const parts = tag.split('/');
const parts = tag.split('/').filter(Boolean);
let parent: TagEntity | undefined;
for (const part of parts) {