You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Express 4.x it has been valid syntax to use an array for a path, ie app.get(['/','/login'], ...). Since the pipe character bug fix was added in 0.0.7 this results in the following bug when the connect-datadog middleware gets called:
TypeError: str.replace is not a function
at replacePipeChar (/usr/src/app/node_modules/connect-datadog/lib/index.js:27:21)
at ServerResponse.res.end (/usr/src/app/node_modules/connect-datadog/lib/index.js:46:39)
at ServerResponse.send (/usr/src/app/node_modules/express/lib/response.js:221:10)
It fails in the replacePipeChar function because it assumes that req.route.path will be a string, but it is actually an an array.
Since Express
4.xit has been valid syntax to use an array for a path, ieapp.get(['/','/login'], ...). Since the pipe character bug fix was added in0.0.7this results in the following bug when theconnect-datadogmiddleware gets called:It fails in the
replacePipeCharfunction because it assumes thatreq.route.pathwill be a string, but it is actually an an array.