@@ -75,9 +75,11 @@ class FocusLock extends Component {
7575 } = this . props ;
7676 const { observed } = this . state ;
7777
78- if ( typeof allowTextSelection !== 'undefined' ) {
79- // eslint-disable-next-line no-console
80- console . warn ( 'React-Focus-Lock: allowTextSelection is deprecated and enabled by default' ) ;
78+ if ( process . env . NODE_ENV !== 'production' ) {
79+ if ( typeof allowTextSelection !== 'undefined' ) {
80+ // eslint-disable-next-line no-console
81+ console . warn ( 'React-Focus-Lock: allowTextSelection is deprecated and enabled by default' ) ;
82+ }
8183 }
8284
8385 const lockProps = {
@@ -116,29 +118,27 @@ class FocusLock extends Component {
116118 }
117119}
118120
119- if ( process . env . NODE_ENV !== 'production' ) {
120- FocusLock . propTypes = {
121- children : PropTypes . node . isRequired ,
122- disabled : PropTypes . bool ,
123- returnFocus : PropTypes . bool ,
124- noFocusGuards : PropTypes . bool ,
121+ FocusLock . propTypes = {
122+ children : PropTypes . node . isRequired ,
123+ disabled : PropTypes . bool ,
124+ returnFocus : PropTypes . bool ,
125+ noFocusGuards : PropTypes . bool ,
125126
126- allowTextSelection : PropTypes . bool ,
127- autoFocus : PropTypes . bool ,
128- persistentFocus : PropTypes . bool ,
127+ allowTextSelection : PropTypes . bool ,
128+ autoFocus : PropTypes . bool ,
129+ persistentFocus : PropTypes . bool ,
129130
130- group : PropTypes . string ,
131- className : PropTypes . string ,
131+ group : PropTypes . string ,
132+ className : PropTypes . string ,
132133
133- whiteList : PropTypes . func ,
134+ whiteList : PropTypes . func ,
134135
135- as : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . func ] ) ,
136- lockProps : PropTypes . object ,
136+ as : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . func ] ) ,
137+ lockProps : PropTypes . object ,
137138
138- onActivation : PropTypes . func ,
139- onDeactivation : PropTypes . func ,
140- } ;
141- }
139+ onActivation : PropTypes . func ,
140+ onDeactivation : PropTypes . func ,
141+ } ;
142142
143143FocusLock . defaultProps = {
144144 disabled : false ,
0 commit comments