@@ -6,7 +6,7 @@ import React, { createRef, Fragment, isValidElement } from 'react'
66import shallowEqual from 'shallowequal'
77
88import {
9- AutoControlledComponent as Component ,
9+ ModernAutoControlledComponent as Component ,
1010 childrenUtils ,
1111 customPropTypes ,
1212 doesNodeContainClick ,
@@ -179,7 +179,7 @@ class Modal extends Component {
179179 debug ( 'close()' )
180180
181181 _ . invoke ( this . props , 'onClose' , e , this . props )
182- this . trySetState ( { open : false } )
182+ this . setState ( { open : false } )
183183 }
184184
185185 handleDocumentMouseDown = ( e ) => {
@@ -200,7 +200,7 @@ class Modal extends Component {
200200 return
201201
202202 _ . invoke ( this . props , 'onClose' , e , this . props )
203- this . trySetState ( { open : false } )
203+ this . setState ( { open : false } )
204204 }
205205
206206 handleIconOverrides = ( predefinedProps ) => ( {
@@ -214,7 +214,7 @@ class Modal extends Component {
214214 debug ( 'open()' )
215215
216216 _ . invoke ( this . props , 'onOpen' , e , this . props )
217- this . trySetState ( { open : true } )
217+ this . setState ( { open : true } )
218218 }
219219
220220 handlePortalMount = ( e ) => {
0 commit comments