The assignment must have been updated at some point because none of the solutions in that thread works with the current requirement of “Should handle words without vowels”. The get a hint guide (<-- has spoilers) does however work.
Can you edit and reformat your code in your last post it hard to see what is going on.