Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/core/src/render3/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ function mergeWithExistingDefinition(
// Preserve the old `setInput` function, because it has some state.
// This is fine, because the component instance is preserved as well.
setInput: clone.setInput,

// Externally this is redundant since we redeclare the definition using the original type.
// Internally we may receive a definition with an alternate, but identical, type so we have
// to ensure that the original one is preserved.
type: clone.type,
});

ngDevMode && assertEqual(replacement, currentDef, 'Expected definition to be merged in place');
Expand Down