Truthiness of Empty Strings
On 230627, our team at Grammarly found a bug where a lot of React components started not working. After investigating for a while, we figured that it came from the recent change where we checked an error with
Sometimes, an error message can be ''. When the error message is empty, we mean the error does not exist. So the program should execute normally.
But after we implemented ESLint in our framework, it started to complain that Unexpected any value in conditional. An explicit comparison or type cast is required. So we changed it to convert it to null loosely.
