Skip to content

fix: PersistentFile.toString() doesn't throw#796

Merged
GrosSacASac merged 2 commits intonode-formidable:masterfrom
pedroslopez:patch-1
Dec 6, 2021
Merged

fix: PersistentFile.toString() doesn't throw#796
GrosSacASac merged 2 commits intonode-formidable:masterfrom
pedroslopez:patch-1

Conversation

@pedroslopez
Copy link
Copy Markdown
Contributor

Calling toString() on a PersistentFile was throwing:

Uncaught Rejection stack=TypeError: Cannot read property 'newFilename' of undefined
    at PersistentFile.toString (formidable/src/PersistentFile.js:50:42)

It seems like ._file wasn't set anywhere, and toJSON was using these directly anyway.

Copy link
Copy Markdown
Contributor

@GrosSacASac GrosSacASac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legit

@GrosSacASac GrosSacASac merged commit 8355c64 into node-formidable:master Dec 6, 2021
@GrosSacASac
Copy link
Copy Markdown
Contributor

Published as 3.1.5

@pedroslopez
Copy link
Copy Markdown
Contributor Author

Published as 3.1.5

Thanks! How does the v2 situation work? Should I make another pr against v2-latest?

@GrosSacASac
Copy link
Copy Markdown
Contributor

I recommend to forget v2

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.

2 participants