This is embarrassing but I'll share anyway. I've been developing software for over 25 years. I spent 3 hours today trying to figure out why in my react app that I assigning the variable document to a File object and document kept showing as undefined. Well, friends document is a reserved word in JS (at least that's how Babel seems to be treating it under the hood). But instead of throwing errors that I did something stupid it failed silently and just assigned undefined. Very frustrating.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is embarrassing but I'll share anyway. I've been developing software for over 25 years. I spent 3 hours today trying to figure out why in my react app that I assigning the variable
document
to a File object anddocument
kept showing as undefined. Well, friendsdocument
is a reserved word in JS (at least that's how Babel seems to be treating it under the hood). But instead of throwing errors that I did something stupid it failed silently and just assigned undefined. Very frustrating.