Getting defining function based on alias `z' error everytime open the terminal

Anyone finding this because of error:

(eval):10: defining function based on alias `z'
(eval):10: parse error near `()' 

My solution was to add function at the function declaration. See https://github.com/ohmyzsh/ohmyzsh/issues/6723#issue-313463147