I just fixed a bug in production with a simple addition of "await" at the start of a line. I bet many of you have had similar experiences. What are some of the shortest fixes you've made to squash a bug with just a few keystrokes?
1 Answer
I've used a single character to fix a bug in C# by implementing nullable types with a '?'. Sometimes those little tweaks save the day!
Totally! I once had to add an optional chaining operator in JavaScript. Just a single '?' and it fixed a critical bug in production.

That's interesting! I've seen C# being more strict, like in TypeScript with strict mode. It catches those errors at compile time, but I suppose it depends on how you're using it.