reordered condition
This commit is contained in:
		
							parent
							
								
									365e2e3982
								
							
						
					
					
						commit
						4a4813ae17
					
				| @ -6,6 +6,6 @@ import { ActionResult } from "./ActionResult"; | ||||
| 
 | ||||
| export function handleActionResult<T>(actionResult:ActionResult<T>): T | undefined | ||||
| { | ||||
|     if(actionResult.error) toast.error(actionResult.error,{position:"top-center",duration:10000}) | ||||
|     else return actionResult.result; | ||||
|     if(!actionResult.error) return actionResult.result; | ||||
|     toast.error(actionResult.error,{position:"top-center",duration:10000}) | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user