FIX: Render legacy color declaration (#34)

This commit is contained in:
Manuel Kostka 2024-06-17 02:09:42 +01:00 committed by GitHub
parent fb4fbf3e79
commit 702c73dafd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -186,11 +186,12 @@ export default {
categoryId: category.id,
prefixType: "icon",
prefixValue: icon,
prefixColor: color ? color : category.color,
prefixColor: color,
};
if (color && !color.match(/categoryColo(u*)r/g)) {
opts.prefixColor = color.replace(/^#/, "");
// Fix for legacy color declaration
if (color?.match(/categoryColo(u*)r/g)) {
opts.prefixColor = category.color;
}
api.registerCustomCategorySectionLinkPrefix(opts);