fixed-ssr-refresh-issue #104
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
hi there,
I faced an issue in my project with SSR build, once i refresh the page I get the error like below
TypeError: Cannot read property 'destroy' of undefined at CarouselComponent.ngOnDestroy (E:\2-3-upgrade\js-storefront\project\dist\project-server\main.js:5767:22) at executeOnDestroys (E:\2-3-upgrade\js-storefront\project\dist\project-server\main.js:184473:28) at cleanUpView (E:\2-3-upgrade\js-storefront\project\dist\project-server\main.js:184397:9) at destroyViewTree (E:\2-3-upgrade\js-storefront\project\dist\project-server\main.js:184223:21) at destroyLView (E:\2-3-upgrade\js-storefront\project\dist\project-server\main.js:184375:9) at RootViewRef.destroy (E:\2-3-upgrade\js-storefront\project\dist\project-server\main.js:184989:9) at E:\2-3-upgrade\js-storefront\project\dist\project-server\main.js:203733:52 at Array.forEach (<anonymous>) at ApplicationRef.ngOnDestroy (E:\2-3-upgrade\js-storefront\project\dist\project-server\main.js:203733:29) at E:\2-3-upgrade\js-storefront\project\dist\project-server\main.js:186353:55so I just added a safe operator to avoid this error.
please merge this PR asap. I got this error in my production.