Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation error]: The value assignment is set before the declaration #291

Closed
Dmitry-Titov-K opened this issue Aug 1, 2023 · 0 comments · Fixed by #292
Closed

[Documentation error]: The value assignment is set before the declaration #291

Dmitry-Titov-K opened this issue Aug 1, 2023 · 0 comments · Fixed by #292

Comments

@Dmitry-Titov-K
Copy link
Contributor

Hi
in the example, I noticed an error, a value is assigned to a variable, but it is not declared (152)

pino-http/README.md

Lines 149 to 154 in 3b0d314

genReqId: function (req, res) {
const existingID = req.id ?? req.headers["x-request-id"]
if (existingID) return existingID
id = randomUUID()
res.setHeader('X-Request-Id', id)
return id

Dmitry-Titov-K added a commit to Dmitry-Titov-K/pino-http that referenced this issue Aug 1, 2023
jsumners added a commit that referenced this issue Aug 1, 2023
fix: #291 added definition for id variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant