For you to know the difference:
== means equal to.
=== means equal and identic to.
What's the difference?
If you do
5==5 you will get
true, as well with
'5===5'. If you do
5=="5" you will also get
true. However, when you do
5==="5" you will get
5 is equal to 5, but when one of the values is a string and the other is a number, the types are different.
=== will check for both type and value. When you try
5==="5", the value might be the same, but the type is not, therefore, it returns
Hope this helps so you can understand why that happened in your code. As I miss access the rest of the code, I don't know why something is now working, but I hope you can find out with this info