Use find instead of listToMaybe and filter
This commit is contained in:
parent
dc2f388310
commit
8b3c37aa36
|
@ -3320,7 +3320,7 @@ checkReturnAgainstZero params token =
|
|||
|
||||
isFirstCommandInFunction = fromMaybe False $ do
|
||||
let path = getPath (parentMap params) token
|
||||
func <- listToMaybe $ filter isFunction path
|
||||
func <- find isFunction path
|
||||
cmd <- getClosestCommand (parentMap params) token
|
||||
return $ getId cmd == getId (getFirstCommandInFunction func)
|
||||
|
||||
|
|
Loading…
Reference in New Issue