Skip to content

Commit

Permalink
Revert "fix(icon): verify the icon loads in the lifecycle (#1278)"
Browse files Browse the repository at this point in the history
This reverts commit 7f7f346.
  • Loading branch information
liamdebeasi committed Nov 20, 2023
1 parent d582e62 commit 3b28f3a
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export class Icon {
private io?: IntersectionObserver;
private iconName: string | null = null;
private inheritedAttributes: { [k: string]: any } = {};
private didLoadIcon = false;

@Element() el!: HTMLElement;

Expand Down Expand Up @@ -95,18 +94,6 @@ export class Icon {
});
}

componentDidLoad() {
/**
* Addresses an Angular issue where property values are assigned after the 'connectedCallback' but prior to the registration of watchers.
* This enhancement ensures the loading of an icon when the component has finished rendering and the icon has yet to apply the SVG data.
* This modification pertains to the usage of Angular's binding syntax:
* `<ion-icon [name]="myIconName"></ion-icon>`
*/
if (!this.didLoadIcon) {
this.loadIcon();
}
}

disconnectedCallback() {
if (this.io) {
this.io.disconnect();
Expand Down Expand Up @@ -151,7 +138,6 @@ export class Icon {
// async if it hasn't been loaded
getSvgContent(url, this.sanitize).then(() => (this.svgContent = ioniconContent.get(url)));
}
this.didLoadIcon = true;
}
}

Expand Down

0 comments on commit 3b28f3a

Please sign in to comment.