@@ -53,8 +53,8 @@ export function diff(
53
53
54
54
if ( ( tmp = options . _diff ) ) tmp ( newVNode ) ;
55
55
56
- try {
57
- outer: if ( typeof newType == 'function' ) {
56
+ outer: if ( typeof newType == 'function' ) {
57
+ try {
58
58
let c , isNew , oldProps , oldState , snapshot , clearProcessingException ;
59
59
let newProps = newVNode . props ;
60
60
@@ -257,39 +257,39 @@ export function diff(
257
257
if ( clearProcessingException ) {
258
258
c . _pendingError = c . _processingException = null ;
259
259
}
260
- } else if (
261
- excessDomChildren == null &&
262
- newVNode . _original === oldVNode . _original
263
- ) {
264
- newVNode . _children = oldVNode . _children ;
265
- newVNode . _dom = oldVNode . _dom ;
266
- } else {
267
- newVNode . _dom = diffElementNodes (
268
- oldVNode . _dom ,
269
- newVNode ,
270
- oldVNode ,
271
- globalContext ,
272
- isSvg ,
273
- excessDomChildren ,
274
- commitQueue ,
275
- isHydrating ,
276
- refQueue
277
- ) ;
278
- }
279
-
280
- if ( ( tmp = options . diffed ) ) tmp ( newVNode ) ;
281
- } catch ( e ) {
282
- newVNode . _original = null ;
283
- // if hydrating or creating initial tree, bailout preserves DOM:
284
- if ( isHydrating || excessDomChildren != null ) {
285
- newVNode . _dom = oldDom ;
286
- newVNode . _hydrating = ! ! isHydrating ;
287
- excessDomChildren [ excessDomChildren . indexOf ( oldDom ) ] = null ;
288
- // ^ could possibly be simplified to:
289
- // excessDomChildren.length = 0;
260
+ } catch ( e ) {
261
+ newVNode . _original = null ;
262
+ // if hydrating or creating initial tree, bailout preserves DOM:
263
+ if ( isHydrating || excessDomChildren != null ) {
264
+ newVNode . _dom = oldDom ;
265
+ newVNode . _hydrating = ! ! isHydrating ;
266
+ excessDomChildren [ excessDomChildren . indexOf ( oldDom ) ] = null ;
267
+ // ^ could possibly be simplified to:
268
+ // excessDomChildren.length = 0;
269
+ }
270
+ options . _catchError ( e , newVNode , oldVNode ) ;
290
271
}
291
- options . _catchError ( e , newVNode , oldVNode ) ;
272
+ } else if (
273
+ excessDomChildren == null &&
274
+ newVNode . _original === oldVNode . _original
275
+ ) {
276
+ newVNode . _children = oldVNode . _children ;
277
+ newVNode . _dom = oldVNode . _dom ;
278
+ } else {
279
+ newVNode . _dom = diffElementNodes (
280
+ oldVNode . _dom ,
281
+ newVNode ,
282
+ oldVNode ,
283
+ globalContext ,
284
+ isSvg ,
285
+ excessDomChildren ,
286
+ commitQueue ,
287
+ isHydrating ,
288
+ refQueue
289
+ ) ;
292
290
}
291
+
292
+ if ( ( tmp = options . diffed ) ) tmp ( newVNode ) ;
293
293
}
294
294
295
295
/**
0 commit comments