remove redundant checks
This commit is contained in:
		
							parent
							
								
									93bd0bc54f
								
							
						
					
					
						commit
						4923cb20c7
					
				
					 1 changed files with 0 additions and 21 deletions
				
			
		|  | @ -1,6 +1,5 @@ | ||||||
| import * as findActions from 'content/actions/find'; | import * as findActions from 'content/actions/find'; | ||||||
| import messages from 'shared/messages'; | import messages from 'shared/messages'; | ||||||
| import * as consoleFrames from '../../console-frames'; |  | ||||||
| 
 | 
 | ||||||
| export default class FindComponent { | export default class FindComponent { | ||||||
|   constructor(win, store) { |   constructor(win, store) { | ||||||
|  | @ -32,31 +31,11 @@ export default class FindComponent { | ||||||
| 
 | 
 | ||||||
|   next() { |   next() { | ||||||
|     let state = this.store.getState().find; |     let state = this.store.getState().find; | ||||||
| 
 |  | ||||||
|     if (!state.found) { |  | ||||||
|       return consoleFrames.postError( |  | ||||||
|         window.document, |  | ||||||
|         'Pattern not found: ' + state.keyword); |  | ||||||
|     } |  | ||||||
|     consoleFrames.postInfo( |  | ||||||
|       window.document, |  | ||||||
|       'Pattern found: ' + state.keyword, |  | ||||||
|     ); |  | ||||||
|     return this.store.dispatch(findActions.next(state.keyword, false)); |     return this.store.dispatch(findActions.next(state.keyword, false)); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   prev() { |   prev() { | ||||||
|     let state = this.store.getState().find; |     let state = this.store.getState().find; | ||||||
| 
 |  | ||||||
|     if (!state.found) { |  | ||||||
|       return consoleFrames.postError( |  | ||||||
|         window.document, |  | ||||||
|         'Pattern not found: ' + state.keyword); |  | ||||||
|     } |  | ||||||
|     consoleFrames.postInfo( |  | ||||||
|       window.document, |  | ||||||
|       'Pattern found: ' + state.keyword, |  | ||||||
|     ); |  | ||||||
|     return this.store.dispatch(findActions.prev(state.keyword, false)); |     return this.store.dispatch(findActions.prev(state.keyword, false)); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
		Reference in a new issue