@@ -111,7 +111,7 @@ const FindReplace = ({ view, defaultQuery, defaultShowReplace, onSearchBarAction
111111 wholeWord,
112112 } )
113113
114- onSearchBarAction ?. ( )
114+ onSearchBarAction ( )
115115 if ( ! newQuery . eq ( query ) ) {
116116 setQuery ( newQuery )
117117 view . dispatch ( { effects : setSearchQuery . of ( newQuery ) } )
@@ -121,7 +121,7 @@ const FindReplace = ({ view, defaultQuery, defaultShowReplace, onSearchBarAction
121121
122122 useEffect ( ( ) => {
123123 if ( ! defaultQuery . eq ( query ) ) {
124- onSearchBarAction ?. ( )
124+ onSearchBarAction ( )
125125 setMatchesCount ( getUpdatedSearchMatchesCount ( defaultQuery , view ) )
126126 setQuery ( defaultQuery )
127127 }
@@ -146,15 +146,15 @@ const FindReplace = ({ view, defaultQuery, defaultShowReplace, onSearchBarAction
146146 const onNext = ( e ?: MouseEvent < HTMLButtonElement > ) => {
147147 e ?. preventDefault ( )
148148 e ?. stopPropagation ( )
149- onSearchBarAction ?. ( )
149+ onSearchBarAction ( )
150150 findNext ( view )
151151 setMatchesCount ( getUpdatedSearchMatchesCount ( query , view ) )
152152 }
153153
154154 const onPrevious = ( e ?: MouseEvent < HTMLButtonElement > ) => {
155155 e ?. preventDefault ( )
156156 e ?. stopPropagation ( )
157- onSearchBarAction ?. ( )
157+ onSearchBarAction ( )
158158 findPrevious ( view )
159159 setMatchesCount ( getUpdatedSearchMatchesCount ( query , view ) )
160160 }
@@ -183,7 +183,7 @@ const FindReplace = ({ view, defaultQuery, defaultShowReplace, onSearchBarAction
183183 e . stopPropagation ( )
184184 if ( e . key === 'Enter' ) {
185185 e . preventDefault ( )
186- onSearchBarAction ?. ( )
186+ onSearchBarAction ( )
187187 replaceNext ( view )
188188 }
189189 }
@@ -193,12 +193,12 @@ const FindReplace = ({ view, defaultQuery, defaultShowReplace, onSearchBarAction
193193 }
194194
195195 const onReplaceTextClick = ( ) => {
196- onSearchBarAction ?. ( )
196+ onSearchBarAction ( )
197197 replaceNext ( view )
198198 }
199199
200200 const onReplaceTextAllClick = ( ) => {
201- onSearchBarAction ?. ( )
201+ onSearchBarAction ( )
202202 replaceAll ( view )
203203 }
204204
0 commit comments