It's hard to say about that, since there is ... which can contain anything (like for example another opening { ).
It's a good practice to always use braces with if / else even if it's just one line in them.
It's a good practice to always use braces with if / else even if it's just one line in them.
That lone } which seemingly belongs to if in this case would be closing the function.