Skip to content

Commit

Permalink
fix: simplify impl
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson committed Feb 20, 2023
1 parent 389e0a6 commit 5e368d1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/@lwc/engine-core/src/framework/rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,7 @@ function mountCustomElement(

if (vm) {
if (process.env.IS_BROWSER) {
// Determine if the child is using an API version that requires native custom element lifecycle
// Note that this is unrelated to whether or not the parent is using native custom element lifecycle
const childVM = getAssociatedVMIfPresent(elm);

if (!shouldVMUseNativeCustomElementLifecycle(childVM)) {
if (!shouldVMUseNativeCustomElementLifecycle(vm)) {
if (process.env.NODE_ENV !== 'production') {
// With synthetic lifecycle callbacks, it's possible for elements to be removed without the engine
// noticing it (e.g. `appendChild` the same host element twice). This test ensures we don't regress.
Expand Down

0 comments on commit 5e368d1

Please sign in to comment.