3 ms·
Thanks! I wasn't aware of that. That said, I don't actually want to ignore it - I think it's good that Typescript is showing people some potentially errors they
by technion 10y ago
Thanks! I wasn't aware of that. That said, I don't actually want to ignore it - I think it's good that Typescript is showing people some potentially errors they never thought to look for.
This pattern really isn't hard and if it saves you from one "undefined is undefined" then it was worth it.
const item = document.getElementById("content");
if (item == null) {
console.log("Render container missing");