Skip to content

Commit 273746a

Browse files
fix(modal): remove warning during state update. (#1448)
1 parent a985f07 commit 273746a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/ui/modal/modal.component.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ export class Modal extends React.PureComponent<ModalProps, State> {
116116
if (this.modalId && !this.props.visible) {
117117
this.hide();
118118
}
119+
120+
if (this.modalId && this.props.visible) {
121+
ModalService.update(this.modalId, this.renderContentElement());
122+
}
119123
}
120124

121125
public componentWillUnmount(): void {
@@ -158,10 +162,6 @@ export class Modal extends React.PureComponent<ModalProps, State> {
158162
};
159163

160164
public render(): React.ReactNode {
161-
if (this.modalId && this.props.visible) {
162-
ModalService.update(this.modalId, this.renderContentElement());
163-
}
164-
165165
return null;
166166
}
167167
}

0 commit comments

Comments
 (0)