10

For hours I spent my time debugging my code, trying different approach to the same code function. Looking for one simple invisible mistake, that is when I want to make a delete request to the IndexedDB.

The request are fine without running a single error, the success event fires perfectly. But one thing which is unexpected, the object inside IndexedDB did not vanish at all. The data stay the same without any flaws (but how can that be, when the 'delete success' event fired? IT SHOULD BE GONE BY NOW!). No kidding, for hours I debug my code, yet found nothing's wrong!

Until one moment I found out the datatype of key I gave the request are different from the object I wanted to delete, the object has a key of 4 and I gave the request "4". I'm so pissed at this moment making me googled 'developer rant' and found this site.
Really! God Bless 1 !== '1'.

Comments
  • 0
    Nice one, and welcome!
  • 1
    @Fast-Nop Thank you ^__^
  • 1
    I've made this mistake way too many times now. Especially is JS when you just don't know your data type without checking at runtime @_@

    This also reminds me of the nightmare that was programming assembly. *chills*
    Without symbols like < or > it was really easy to mix them up. 2 week but right there.
  • 1
    Welcome to the *most chill* community online
  • 1
    @andpeterson Thanks to you all. I can make my own avatar now (an angry guy)!
Add Comment