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(runtime): remove forceUpdate in appendChild patch #5437

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 1 addition & 3 deletions src/runtime/dom-extras.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BUILD } from '@app-data';
import { forceUpdate, getHostRef, plt, supportsShadow } from '@platform';
import { getHostRef, plt, supportsShadow } from '@platform';
import { NODE_TYPES } from '@stencil/core/mock-doc';
import { CMP_FLAGS, HOST_FLAGS } from '@utils';

Expand Down Expand Up @@ -88,8 +88,6 @@ export const patchSlotAppendChild = (HostElementPrototype: any) => {

// Check if there is fallback content that should be hidden
updateFallbackSlotVisibility(this);
// Force a re-render of the host element
forceUpdate(this);

return insertedNode;
}
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/vdom/vdom-render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ render() {
// If the node we're currently planning on inserting the new node before is an element,
// we need to do some additional checks to make sure we're inserting the node in the correct order.
// The use case here would be that we have multiple nodes being relocated to the same slot. So, we want
// to make sure they get inserted into their new how in the same order they were declared in their original location.
// to make sure they get inserted into their new home in the same order they were declared in their original location.
//
// TODO(STENCIL-914): Remove `experimentalSlotFixes` check
if (
Expand Down
Loading