FIX: Render legacy color declaration (#34)
This commit is contained in:
parent
fb4fbf3e79
commit
702c73dafd
|
@ -186,11 +186,12 @@ export default {
|
||||||
categoryId: category.id,
|
categoryId: category.id,
|
||||||
prefixType: "icon",
|
prefixType: "icon",
|
||||||
prefixValue: icon,
|
prefixValue: icon,
|
||||||
prefixColor: color ? color : category.color,
|
prefixColor: color,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (color && !color.match(/categoryColo(u*)r/g)) {
|
// Fix for legacy color declaration
|
||||||
opts.prefixColor = color.replace(/^#/, "");
|
if (color?.match(/categoryColo(u*)r/g)) {
|
||||||
|
opts.prefixColor = category.color;
|
||||||
}
|
}
|
||||||
|
|
||||||
api.registerCustomCategorySectionLinkPrefix(opts);
|
api.registerCustomCategorySectionLinkPrefix(opts);
|
||||||
|
|
Loading…
Reference in New Issue