jaredhanson / jaredhanson/connect-flash

req.flash() returning different values on same scope

Open
#44 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.2k
Forks
173
PR merge metrics
No merged PRs in 30d

Description

I set a flash value as:
req.flash('error', 'Invalid email or password');

but when i accessing this in appropriate section with console.log, the results are different:

console.log(req.flash('error')); //output: ['Invalid email or password']
console.log(req.flash('error')); // output: []

what is reason? why it is returning different result?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the req.flash() entry point and reproduce the two consecutive reads shown in the report. Check the implementation and existing tests for how repeated reads of the same message are handled; done means explaining the observed outputs or identifying a reproducible behavior that needs a documented or code-level change.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.