@@ -28,7 +28,7 @@ const MODE_HYDRATE = 1 << 5;
2828const CAMEL_PROPS =
2929 / ^ (?: a c c e n t | a l i g n m e n t | a r a b i c | b a s e l i n e | c a p | c l i p (? ! P a t h U ) | c o l o r | d o m i n a n t | f i l l | f l o o d | f o n t | g l y p h (? ! R ) | h o r i z | i m a g e ( ! S ) | l e t t e r | l i g h t i n g | m a r k e r (? ! H | W | U ) | o v e r l i n e | p a i n t | p o i n t e r | s h a p e | s t o p | s t r i k e t h r o u g h | s t r o k e | t e x t (? ! L ) | t r a n s f o r m | u n d e r l i n e | u n i c o d e | u n i t s | v | v e c t o r | v e r t | w o r d | w r i t i n g | x (? ! C ) ) [ A - Z ] / ;
3030const CAMEL_REPLACE = / [ A - Z 0 - 9 ] / g;
31- const IS_DOM = typeof document !== 'undefined' ;
31+ const IS_DOM = typeof document != 'undefined' ;
3232
3333/**
3434 * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84
@@ -177,63 +177,59 @@ function handleDomVNode(vnode) {
177177 let value = props [ i ] ;
178178
179179 if (
180- ( i === 'value' && 'defaultValue' in props && value == null ) ||
180+ ( i == 'value' && 'defaultValue' in props && value == null ) ||
181181 // Emulate React's behavior of not rendering the contents of noscript tags on the client.
182- ( IS_DOM && i === 'children' && type = == 'noscript' ) ||
183- i === 'class' ||
184- i === 'className'
182+ ( IS_DOM && i == 'children' && type == 'noscript' ) ||
183+ i == 'class' ||
184+ i == 'className'
185185 ) {
186186 // Skip applying value if it is null/undefined and we already set
187187 // a default value
188188 continue ;
189189 }
190190
191- if ( i === 'style' && typeof value = == 'object' ) {
191+ if ( i == 'style' && typeof value == 'object' ) {
192192 let cloned ;
193193 for ( let key in value ) {
194- if ( typeof value [ key ] === 'number' && ! IS_NON_DIMENSIONAL . test ( key ) ) {
194+ if ( typeof value [ key ] == 'number' && ! IS_NON_DIMENSIONAL . test ( key ) ) {
195195 if ( ! cloned ) {
196196 cloned = value = assign ( { } , value ) ;
197197 }
198198 value [ key ] += 'px' ;
199199 }
200200 }
201- } else if (
202- i === 'defaultValue' &&
203- 'value' in props &&
204- props . value == null
205- ) {
201+ } else if ( i == 'defaultValue' && 'value' in props && props . value == null ) {
206202 // `defaultValue` is treated as a fallback `value` when a value prop is present but null/undefined.
207203 // `defaultValue` for Elements with no value prop is the same as the DOM defaultValue property.
208204 i = 'value' ;
209- } else if ( i === 'download' && value === true ) {
205+ } else if ( i == 'download' && value === true ) {
210206 // Calling `setAttribute` with a truthy value will lead to it being
211207 // passed as a stringified value, e.g. `download="true"`. React
212208 // converts it to an empty string instead, otherwise the attribute
213209 // value will be used as the file name and the file will be called
214210 // "true" upon downloading it.
215211 value = '' ;
216- } else if ( i === 'translate' && value === 'no' ) {
212+ } else if ( i == 'translate' && value === 'no' ) {
217213 value = false ;
218- } else if ( i [ 0 ] === 'o' && i [ 1 ] = == 'n' ) {
214+ } else if ( i [ 0 ] == 'o' && i [ 1 ] == 'n' ) {
219215 let lowerCased = i . toLowerCase ( ) ;
220- if ( lowerCased === 'ondoubleclick' ) {
216+ if ( lowerCased == 'ondoubleclick' ) {
221217 i = 'ondblclick' ;
222218 } else if (
223- lowerCased === 'onchange' &&
224- ( type === 'input' || type = == 'textarea' ) &&
219+ lowerCased == 'onchange' &&
220+ ( type == 'input' || type == 'textarea' ) &&
225221 ! onChangeInputType ( props . type )
226222 ) {
227223 lowerCased = i = 'oninput' ;
228- } else if ( lowerCased === 'onfocus' ) {
224+ } else if ( lowerCased == 'onfocus' ) {
229225 i = 'onfocusin' ;
230- } else if ( lowerCased === 'onblur' ) {
226+ } else if ( lowerCased == 'onblur' ) {
231227 i = 'onfocusout' ;
232228 }
233229
234230 // Add support for onInput and onChange, see #3561
235231 // if we have an oninput prop already change it to oninputCapture
236- if ( lowerCased === 'oninput' ) {
232+ if ( lowerCased == 'oninput' ) {
237233 i = lowerCased ;
238234 if ( normalizedProps [ i ] ) {
239235 i = 'oninputCapture' ;
@@ -289,9 +285,9 @@ function handleDomVNode(vnode) {
289285let oldVNodeHook = options . vnode ;
290286options . vnode = vnode => {
291287 // only normalize props on Element nodes
292- if ( typeof vnode . type === 'string' ) {
288+ if ( typeof vnode . type == 'string' ) {
293289 handleDomVNode ( vnode ) ;
294- } else if ( typeof vnode . type === 'function' ) {
290+ } else if ( typeof vnode . type == 'function' ) {
295291 const shouldApplyRef =
296292 'prototype' in vnode . type && vnode . type . prototype . render ;
297293 if ( 'ref' in vnode . props && shouldApplyRef ) {
@@ -337,7 +333,7 @@ options.diffed = function (vnode) {
337333
338334 if (
339335 dom != null &&
340- vnode . type === 'textarea' &&
336+ vnode . type == 'textarea' &&
341337 'value' in props &&
342338 props . value !== dom . value
343339 ) {
0 commit comments