Skip to content

Commit 5f74915

Browse files
authored
x
1 parent 292c4f1 commit 5f74915

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/diff/patch.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ export function patch(
3333
startDom
3434
) {
3535
let dom = internal._dom;
36+
let flags = internal._flags;
3637

37-
if (internal._flags & TYPE_TEXT) {
38+
if (flags & TYPE_TEXT) {
3839
if (newVNode !== internal.props) {
3940
dom.data = newVNode;
4041
internal.props = newVNode;
@@ -49,7 +50,7 @@ export function patch(
4950

5051
if (options._diff) options._diff(internal, newVNode);
5152

52-
if (internal._flags & TYPE_ELEMENT) {
53+
if (flags & TYPE_ELEMENT) {
5354
if (newVNode._vnodeId !== internal._vnodeId) {
5455
// @ts-ignore dom is a PreactElement here
5556
patchDOMElement(dom, newVNode, internal, globalContext, commitQueue);
@@ -73,7 +74,7 @@ export function patch(
7374
// top.
7475
let prevStartDom = startDom;
7576
let prevParentDom = parentDom;
76-
if (internal._flags & TYPE_ROOT) {
77+
if (flags & TYPE_ROOT) {
7778
parentDom = newVNode.props._parentDom;
7879

7980
if (parentDom !== prevParentDom) {

0 commit comments

Comments
 (0)