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

III-3825 Use lodash flatten() instead of Array.prototype.flat() #201

Merged
merged 1 commit into from Mar 4, 2021

Conversation

bertramakers
Copy link
Contributor

Changed

  • Use lodash flatten() instead of Array.prototype.flat() for node 10 compatibility. (The servers and Vagrant box use node 10 right now, and while we should look into updating that it might take some work to get udb3-websockets etc compatible with newer versions, so we should make sure udb3-frontend can be deployed in the meantime.)

Ticket: https://jira.uitdatabank.be/browse/III-3825

@simon-debruijn simon-debruijn merged commit db0c597 into main Mar 4, 2021
@simon-debruijn simon-debruijn deleted the bugfix/III-3825-fix-flat-is-not-a-function branch March 4, 2021 16:06
@geoffreydhuyvetters
Copy link
Contributor

Another approach could have been to use a polyfill

https://www.npmjs.com/package/array-flat-polyfill

@bertramakers
Copy link
Contributor Author

True, we can still do that of course? This is now getting deployed to deblock Corneel on acc but that doesn't mean we can change the fix and include it in a next deploy?

@bertramakers
Copy link
Contributor Author

bertramakers commented Mar 4, 2021

Because I see the value in using a polyfill so we can already use .flat() now and don't have to refactor usages of lodash' flatten later.

@geoffreydhuyvetters
Copy link
Contributor

Jep, no problem, I just like to think forward.

@bertramakers
Copy link
Contributor Author

Yes I was agreeing with you actually, just didn't think of the polyfill and this is now merged already but we can do it in another PR 😄

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

4 participants