My result is correct, but the test won't pass

Tell us what’s happening:
I have been getting this issue where my result is correct, but the test won’t pass.

Your code so far


function sumPrimes(num) {
  function divisors(m){
      let arr = [];
      for(let i = 1; i <= m ; i++){
        if(m % i == 0)
          arr.push(i);
      }
      return arr;
    }
  function prime(n){ 
    return n < 2 ? false : divisors(n).length == 2;
  }
  let sum = 0;
  for(let i =  2; i <= num; i++){
    prime(i) ? sum+= i : 1;
  }
    console.log(sum);
  return sum;
}

sumPrimes(977);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36.

Link to the challenge:

After adding console.clear to the first line it seems to work now.
When I remove console.clear, it fails the test again.
It may be a bug. Can anyone open the challenge and paste my code and see if they can reproduce it?

Your original solution passes for me.