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

Update docs to check for empty object #100

Merged
merged 1 commit into from
Oct 18, 2018
Merged

Update docs to check for empty object #100

merged 1 commit into from
Oct 18, 2018

Conversation

mikeesto
Copy link
Contributor

@mikeesto mikeesto commented Oct 18, 2018

Hi! I recently came across this project. Huge fan.

One issue that I ran into was checking if no files had been uploaded. The docs recommend if (!req.files). But as req.files has been intentionally left as an empty object to follow the same conventions of other middlewares, this if statement will never be true. The reasonable way seems to be to check if the object is empty. I've updated the docs to reflect this.

There's also some discussion about this in #31

Thanks : )

@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.536% when pulling 683c047 on MichaelE1:docs-check-empty-object into 4d911b6 on richardgirges:master.

5 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.536% when pulling 683c047 on MichaelE1:docs-check-empty-object into 4d911b6 on richardgirges:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.536% when pulling 683c047 on MichaelE1:docs-check-empty-object into 4d911b6 on richardgirges:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.536% when pulling 683c047 on MichaelE1:docs-check-empty-object into 4d911b6 on richardgirges:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.536% when pulling 683c047 on MichaelE1:docs-check-empty-object into 4d911b6 on richardgirges:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.536% when pulling 683c047 on MichaelE1:docs-check-empty-object into 4d911b6 on richardgirges:master.

@richardgirges
Copy link
Owner

Hey there, GREAT catch! Thanks for sending this!!

@richardgirges richardgirges merged commit 5d36fd2 into richardgirges:master Oct 18, 2018
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 this pull request may close these issues.

None yet

3 participants