fix(core): run HMR replacement in the zone#59562
fix(core): run HMR replacement in the zone#59562crisbeto wants to merge 1 commit intoangular:mainfrom
Conversation
Fixes that in some cases the HMR replacement function was being run outside the zone which meant that change detection would break down after a replacement. Fixes angular#59559.
| ngDevMode && assertTNodeType(tNode, TNodeType.Element); | ||
| ngDevMode && assertNotEqual(newDef, oldDef, 'Expected different component definition'); | ||
| const zone = lView[INJECTOR].get(NgZone, null); | ||
| const recreate = () => { |
There was a problem hiding this comment.
This logic is the same as before, I just had to wrap it in a callback.
|
I don't like being that guy, but could we get a fast tracked release for this? I had to disable hmr because I'm never sure if the issue is my code or this. |
|
@wartab we are planning to cut a patch release as soon as this fix lands. |
|
This PR was merged into the repository by commit c9cd558. The changes were merged into the following branches: main, 19.1.x |
|
@wartab 19.1.1 patch release with a fix should be on the npm |
|
@pkozlowski-opensource Thank you so much for keeping me updated. I'll give it a try now. |
Fixes that in some cases the HMR replacement function was being run outside the zone which meant that change detection would break down after a replacement. Fixes angular#59559. PR Close angular#59562
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes that in some cases the HMR replacement function was being run outside the zone which meant that change detection would break down after a replacement.
Fixes #59559.