A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications on top of TypeScript & JavaScript (ES6, ES7, ES8) 🚀
nodejs
javascript
node
microservices
framework
typescript
javascript-framework
websockets
nest
nodejs-framework
typescript-framework
nestjs
-
Updated
Nov 18, 2021 - TypeScript
Describe the bug
When an optional route param (i.e.
/foo/:bar?) is not supplied for a particular request, thereq.paramsobject 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: