22 EMPTY_OBJ ,
33 MODE_HYDRATE ,
44 MODE_SUSPENDED ,
5- RESET_MODE
5+ RESET_MODE ,
6+ UNDEFINED
67} from '../constants' ;
78import { BaseComponent , getDomSibling } from '../component' ;
89import { Fragment } from '../create-element' ;
@@ -47,7 +48,7 @@ export function diff(
4748
4849 // When passing through createElement it assigns the object
4950 // constructor as undefined. This to prevent JSON-injection.
50- if ( newVNode . constructor !== undefined ) return null ;
51+ if ( newVNode . constructor !== UNDEFINED ) return null ;
5152
5253 // If the previous diff bailed out, resume creating/hydrating.
5354 if ( oldVNode . _flags & MODE_SUSPENDED ) {
@@ -317,7 +318,7 @@ export function diff(
317318 * @param {VNode } root
318319 */
319320export function commitRoot ( commitQueue , root , refQueue ) {
320- root . _nextDom = undefined ;
321+ root . _nextDom = UNDEFINED ;
321322
322323 for ( let i = 0 ; i < refQueue . length ; i ++ ) {
323324 applyRef ( refQueue [ i ] , refQueue [ ++ i ] , refQueue [ ++ i ] ) ;
@@ -534,7 +535,7 @@ function diffElementNodes(
534535 if ( nodeType === 'progress' && inputValue == null ) {
535536 dom . removeAttribute ( 'value' ) ;
536537 } else if (
537- inputValue !== undefined &&
538+ inputValue !== UNDEFINED &&
538539 // #2756 For the <progress>-element the initial value is 0,
539540 // despite the attribute not being present. When the attribute
540541 // is missing the progress bar is treated as indeterminate.
@@ -550,7 +551,7 @@ function diffElementNodes(
550551 }
551552
552553 i = 'checked' ;
553- if ( checked !== undefined && checked !== dom [ i ] ) {
554+ if ( checked !== UNDEFINED && checked !== dom [ i ] ) {
554555 setProperty ( dom , i , checked , oldProps [ i ] , namespace ) ;
555556 }
556557 }
@@ -633,7 +634,7 @@ export function unmount(vnode, parentVNode, skipRemove) {
633634
634635 // Must be set to `undefined` to properly clean up `_nextDom`
635636 // for which `null` is a valid value. See comment in `create-element.js`
636- vnode . _component = vnode . _parent = vnode . _dom = vnode . _nextDom = undefined ;
637+ vnode . _component = vnode . _parent = vnode . _dom = vnode . _nextDom = UNDEFINED ;
637638}
638639
639640/** The `.render()` method for a PFC backing instance. */
0 commit comments