Possible issue with "Pig Latin" Algorithm Challenge [SOLVED]

My solution to this challenge was not accepted as it was not passing this requirement:

 translatePigLatin("paragraphs") should return "aragraphspay"

I decided to use 2 arrays to check for consonant clusters. Per my calls to the function, everything checks out ok as can be seen here:

https://repl.it/MyoA/4

Is this a bug in the challenge code or am I missing something?

It appears I’ve sliced too many characters. How embarrassing. Thank you!