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

fix(core): don't extend html elements #4691

Merged
merged 2 commits into from
Jun 21, 2021

Conversation

vltansky
Copy link
Collaborator

@vltansky vltansky commented Jun 20, 2021

Angular SSR build error:
run npm run angular:dev:ssr on master to reproduce.

ERROR RangeError: Maximum call stack size exceeded
    at Array.filter (<anonymous>)
    at extend (D:\projects\swiper\dist\demo\server\home-home-module.js:7616:55)
    at extend (D:\projects\swiper\dist\demo\server\home-home-module.js:7637:15)
    at extend (D:\projects\swiper\dist\demo\server\home-home-module.js:7637:15)
    at extend (D:\projects\swiper\dist\demo\server\home-home-module.js:7637:15)
    at extend (D:\projects\swiper\dist\demo\server\home-home-module.js:7637:15)
    at extend (D:\projects\swiper\dist\demo\server\home-home-module.js:7637:15)
    at extend (D:\projects\swiper\dist\demo\server\home-home-module.js:7637:15)
    at extend (D:\projects\swiper\dist\demo\server\home-home-module.js:7637:15)
    at extend (D:\projects\swiper\dist\demo\server\home-home-module.js:7637:15)

extend() function from src/utils.js passing object from HTMLElement type to itself as it recognizes it as Object (that is technically right). That's leading to recursion, as HTMLElement has a lot of inner objects.

This PR adds check !(nextSource instanceof HTMLElement) to extend() function to skip HTML Elements from extending.

closes #4576

@nolimits4web nolimits4web merged commit 32ae99b into nolimits4web:master Jun 21, 2021
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.

ERROR RangeError: Maximum call stack size exceeded
2 participants