Skip to content

Commit 3b28f3a

Browse files
committed
Revert "fix(icon): verify the icon loads in the lifecycle (#1278)"
This reverts commit 7f7f346.
1 parent d582e62 commit 3b28f3a

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/components/icon/icon.tsx

-14
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export class Icon {
1212
private io?: IntersectionObserver;
1313
private iconName: string | null = null;
1414
private inheritedAttributes: { [k: string]: any } = {};
15-
private didLoadIcon = false;
1615

1716
@Element() el!: HTMLElement;
1817

@@ -95,18 +94,6 @@ export class Icon {
9594
});
9695
}
9796

98-
componentDidLoad() {
99-
/**
100-
* Addresses an Angular issue where property values are assigned after the 'connectedCallback' but prior to the registration of watchers.
101-
* This enhancement ensures the loading of an icon when the component has finished rendering and the icon has yet to apply the SVG data.
102-
* This modification pertains to the usage of Angular's binding syntax:
103-
* `<ion-icon [name]="myIconName"></ion-icon>`
104-
*/
105-
if (!this.didLoadIcon) {
106-
this.loadIcon();
107-
}
108-
}
109-
11097
disconnectedCallback() {
11198
if (this.io) {
11299
this.io.disconnect();
@@ -151,7 +138,6 @@ export class Icon {
151138
// async if it hasn't been loaded
152139
getSvgContent(url, this.sanitize).then(() => (this.svgContent = ioniconContent.get(url)));
153140
}
154-
this.didLoadIcon = true;
155141
}
156142
}
157143

0 commit comments

Comments
 (0)