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
Fix file info of new uploaded file not being persisted after edit #8244
Fix file info of new uploaded file not being persisted after edit #8244
Conversation
Signed-off-by: henrych4 <singyinhenry@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #8244 +/- ##
==========================================
+ Coverage 33.04% 33.06% +0.02%
==========================================
Files 1219 1219
Lines 13573 13582 +9
Branches 1348 1350 +2
==========================================
+ Hits 4485 4491 +6
- Misses 8206 8208 +2
- Partials 882 883 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Thanks a lot @henrych4!
Can you just add a small test for the reducer's new case?
@@ -145,6 +145,12 @@ const reducer = (state, action) => | |||
draftState.selectedFiles = draftState.selectedFiles.filter(file => file && file.id); | |||
break; | |||
} | |||
case 'ON_SUBMIT_EDIT_NEW_FILE': { |
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.
Can you add the related test for this case?
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.
test added.
Signed-off-by: henrych4 <singyinhenry@gmail.com>
e9b5cd3
to
a950c51
Compare
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.
LGTM!
Thanks a lot for your contribution.
This pull request has been mentioned on Strapi Community. There might be relevant details there: https://forum.strapi.io/t/new-release-strapi-v3-2-4-security-fix/509/1 |
Description of what you did:
fix #8097
dispatch an action to update file info after edited a new uploaded file.