The Wayback Machine - https://web.archive.org/web/20211118075528/https://github.com/topics/javascript-framework
Skip to content
#

javascript-framework

Here are 939 public repositories matching this topic...

tinyhttp
groenroos
groenroos commented Oct 28, 2021

Describe the bug

When an optional route param (i.e. /foo/:bar?) is not supplied for a particular request, the req.params object will still contain it, with a string value of "undefined".

This would mean that i.e. if (req.params.bar) would unexpectedly always be truthy, even when the param was not supplied.

To Reproduce

Simple app with optional route param bar:

Improve this page

Add a description, image, and links to the javascript-framework topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the javascript-framework topic, visit your repo's landing page and select "manage topics."

Learn more