@@ -294,23 +294,15 @@ function diffProperties(
294
294
prevProp = prevProps [ propKey ] ;
295
295
nextProp = nextProps [ propKey ] ;
296
296
297
- if ( typeof nextProp === 'function' ) {
298
- if ( typeof attributeConfig === 'object' ) {
299
- // When the config for a function prop has a custom process method
300
- // we don't assume its a regular event handler, but use the process method:
301
- nextProp = attributeConfig . process ( nextProp ) ;
302
- if ( typeof prevProp === 'function' ) {
303
- prevProp = attributeConfig . process ( prevProp ) ;
304
- }
305
- } else {
306
- // functions are converted to booleans as markers that the associated
307
- // events should be sent from native.
308
- nextProp = ( true : any ) ;
309
- // If nextProp is not a function, then don't bother changing prevProp
310
- // since nextProp will win and go into the updatePayload regardless.
311
- if ( typeof prevProp === 'function' ) {
312
- prevProp = ( true : any ) ;
313
- }
297
+ const attributeConfigHasProcess = typeof attributeConfig === 'object' && typeof attributeConfig . process === 'function' ;
298
+ if ( typeof nextProp === 'function' && ! attributeConfigHasProcess ) {
299
+ // functions are converted to booleans as markers that the associated
300
+ // events should be sent from native.
301
+ nextProp = ( true : any ) ;
302
+ // If nextProp is not a function, then don't bother changing prevProp
303
+ // since nextProp will win and go into the updatePayload regardless.
304
+ if ( typeof prevProp === 'function' ) {
305
+ prevProp = ( true : any ) ;
314
306
}
315
307
}
316
308
0 commit comments