Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(VFileInput): conditionally return single File instead of File[]
- Loading branch information
1 parent
f66d83f
commit 581bbbc
Showing
1 changed file
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
581bbbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prior to this change,
<VFileInput>
always returned an array of files. Now it returns a single file when themultiple
prop is false.Therefore, this is a breaking change to the API of a very widely used component that should not be made in a patch release and should have been clearly signalled as such in the release notes.
581bbbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to show how this is breaking. The only change is if you provide a non-array model.
581bbbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see how this could change if you were initialising it to null, but this is a bug fix.
https://xkcd.com/1172/
581bbbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a breaking change because if I use
Then if
foo
is initially null, then when a file is uploaded, it was previously set to a File array, but now it will be set to a File. I'm surprised you're disputing this, given that your commit message says:I also know it's a breaking change, because when I upgraded to this version, the file inputs stopped working, causing a bunch of e2e tests to fail.