Editor Bugg display's wrong while code is right

So this have taken a lot of my time for no reason and have confused me while i was right,
sometimes when you play with code and try it and it doesn’t work properly and then you edit it to work it will still display that the code is wrong, you will need to press reset my code and paste whatever you typed before and press run for it to work!

example:
In this challenge https://www.freecodecamp.org/challenges/make-object-properties-private
i did it correctly like this:

var Bike = function() {

  // Only change code below this line.

var gear;

this.setGear = function(ch){
  gear = ch;
};
  
this.getGear = function(){
    return gear;
  };
  
};

var myBike = new Bike();

but it was saying code is wrong and then i copy and paste it after pressing Reset your code and it worked!

There is a known bug that requires users to occasionally reset the challenges to get the tests to run properly.