DEV Community

Discussion on: Designing a URL Shortener in Deno

Collapse
 
hanna profile image
Hanna

Why are you doing if(context.params ...) when Deno supports optional chaining? if(urls[context.params?.urlid]) would be sufficient.

Collapse
 
thewritingdev profile image
Akash Joshi

For sure! You're right :)