A missing semi-colon after an 'if-then' condition at 2 am can cause a lot of confusion when you check the logic, and it works, but the code still ignores the conditions you set up because your tired brain didn't see the missing semi-colon.
Discussion
Pulling out your hair because the code of one function doesnโt seem te be working at all and after two hours of googling why the code isnโt working, it all comes down to a spelling mistake you have been overlooking the whole time ๐ฑ