Comment

Comment by bmeski

That’s literally how all polyfills work. They first check if the thing is there, and if not then implement it.

And in this case you can simply do an if statement with (first && first.second && first.second.third)

My point being, writing one long line is how the language inherently works. Use that instead of the new feature that only ships in new browsers. I’d still be upset if one of my teammates added an entire bundling system so they can simply write fewer lines for such simple menial aspects of the code. Forest for the trees.

parent bmeski 4 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton