MOBILE-4456 icons: Do not apply colors if svg has styles

main
Pau Ferrer Ocaña 2024-03-15 11:57:31 +01:00
parent 61de79c493
commit a94b58af6e
1 changed files with 5 additions and 0 deletions

View File

@ -354,6 +354,11 @@ export class CoreModIconComponent implements OnInit, OnChanges {
scripts[i].parentNode?.removeChild(scripts[i]);
}
// Has own styles, do not apply colors.
if (doc.documentElement.getElementsByTagName('style').length > 0) {
this.isBranded = true;
}
// Recursively remove attributes starting with on.
const removeAttributes = (element: Element): void => {
Array.from(element.attributes).forEach((attr) => {