-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
chunkExtractor.getScriptElements
returns nested array in 5.13.1
#592
Comments
Hey @bendvc 👋, |
Yep, it could flatten scripts before returning. |
@theKashey happy to pick this up if you're busy. |
@markwoodward23 - that would be very good. It's like a few lines to change, but I don't have any time to work on this. |
@theKashey - tried forking and install but I keep seeing this error when running tests:
Any ideas? |
@markwoodward23 sounds like you need |
🐛 Bug Report
Public API for
chunkExtractor.getScriptElements
is described as being an Array of React <script> Elements. As of version5.13.1
it returns an array who's first element is also an array.To Reproduce
Unfortunately I cannot share my private repo. But the recent change to this function was the cause of this error.
loadable-components/packages/server/src/ChunkExtractor.js
Line 300 in 8cf392d
Previously it returned a single element, but is now returning an array that isn't getting spread in this function
loadable-components/packages/server/src/ChunkExtractor.js
Line 384 in 8cf392d
Expected behavior
chunkExtractor.getScriptElements
returns an array of react script elements.The text was updated successfully, but these errors were encountered: