Pig Latin Challenge - Last Test

Can some please explain why this code block does not pass the challenge, the last test “Should handle words without vowels.”, But I believe I handle it correctly in the first if statement. Please correct me, and advise what is the mistake in my code

My code so far

function translatePigLatin(str) {
  if (!str.match(/[aeiou]/g)) {
    str = str.replace(/([\w])([\w]+)/g, "$2$1ay");

  } else if (str.match(/^[aeiou]\w+/)) {
    str = str.replace(/(^[aeiou])(\w+)/, "$1$2way");

  } else if (str.match(/^[^aeiou][^aeiou]+/)) {
    str = str.replace(/(^[^aeiou][^aeiou]+)(\w+)/, "$2$1ay");

  } else {
    str = str.replace(/(^[^aeiou])(\w+)/, "$2$1ay");
  return str;

// test here

In your first statement you’re switching the order of letters.

Hello, Brother. It should be the correct way right. Or else should i append “ay” just to end of the original word, if there is no vowel present in the given word.

Pig Latin takes the first consonant (or consonant cluster)…

If there are no vowels then what is the “consonant cluster”?