Skip to content

Commit aacc737

Browse files
committed
use this.state.icon in didMount
1 parent a98e18d commit aacc737

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
- Fixed `EuiPageHeader` bottom padding when `borderBottom = true` ([#4905](https://github.com/elastic/eui/pull/4905))
4343
- Fixed incomplete `height` and `width` information in `EuiResizeObserver` ([#4909](https://github.com/elastic/eui/pull/4909))
4444

45-
4645
**Theme: Amsterdam**
4746

4847
- Updated styles for `EuiRange` ([#4815](https://github.com/elastic/eui/pull/4815)

src/components/icon/icon.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,9 +606,8 @@ export class EuiIcon extends PureComponent<EuiIconProps, State> {
606606

607607
componentDidMount() {
608608
const { type } = this.props;
609-
const initialIcon = getInitialIcon(type);
610609

611-
if (isEuiIconType(type) && initialIcon == null) {
610+
if (isEuiIconType(type) && this.state.icon == null) {
612611
//eslint-disable-next-line react/no-did-mount-set-state
613612
this.setState({
614613
neededLoading: true,

0 commit comments

Comments
 (0)