Change lodash flatten to flattenDeep. The lodash flatten function Flattens `array` a single level deep. which is inadequate for more than 2 image uploads as outlined in this comment. The lodash function flattenDeep Recursively flattens a nested array.
npm run test-all ran the same before and after changes we're made on Windows 10 and Ubuntu 18.04 (running in WSL).
I don't foresee any browser issues associated with this.
This error is thrown during tests which I have seen elsewhere and don't believe it is affected by this PR:
1 failing
1) FieldType: Markdown: Filter "before all" hook:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
[x] List browser version(s) any admin UI changes were tested in:
Windows Chrome Version 76.0.3809.100 (Official Build) (64-bit)
[x] Please confirm you've added (or verified) test coverage for this change.
[x] Please confirm npm run test-all ran successfully.
Description of changes
Change lodash flatten to flattenDeep. The lodash flatten function
Flattens `array` a single level deep.
which is inadequate for more than 2 image uploads as outlined in this comment. The lodash function flattenDeepRecursively flattens a nested array.
Related issues (if any)
Cloudinary: multiple images upload not working #4857
This may or may not be fixed in PR https://github.com/keystonejs/keystone/pull/4774 which is unlikely to be merged due to its size.
Testing
npm run test-all
ran the same before and after changes we're made on Windows 10 and Ubuntu 18.04 (running in WSL). I don't foresee any browser issues associated with this. This error is thrown during tests which I have seen elsewhere and don't believe it is affected by this PR:Windows Chrome Version 76.0.3809.100 (Official Build) (64-bit)
npm run test-all
ran successfully.