@@ -149,8 +149,25 @@ export function applyUpdateTransition(
149149 const propsToSet = { } as ElementProps ;
150150
151151 prepareTransformAllPropsFinal ( el , elOption , propsToSet ) ;
152- prepareShapeOrExtraAllPropsFinal ( 'shape' , elOption , propsToSet ) ;
153- prepareShapeOrExtraAllPropsFinal ( 'extra' , elOption , propsToSet ) ;
152+
153+ if ( el . type === 'compound' ) {
154+ /**
155+ * We cannot directly clone shape for compoundPath,
156+ * because it makes the path to be an object instead of a Path instance,
157+ * and thus missing `buildPath` method.
158+ */
159+ const paths : Path [ ] = ( el as Path ) . shape . paths ;
160+ const optionPaths = elOption . shape . paths as TransitionElementOption [ 'shape' ] [ 'paths' ] ;
161+ for ( let i = 0 ; i < optionPaths . length ; i ++ ) {
162+ const path = optionPaths [ i ] ;
163+ prepareShapeOrExtraAllPropsFinal ( 'shape' , path , paths [ i ] ) ;
164+ prepareShapeOrExtraAllPropsFinal ( 'extra' , path , paths [ i ] ) ;
165+ }
166+ }
167+ else {
168+ prepareShapeOrExtraAllPropsFinal ( 'shape' , elOption , propsToSet ) ;
169+ prepareShapeOrExtraAllPropsFinal ( 'extra' , elOption , propsToSet ) ;
170+ }
154171
155172 if ( ! isInit && hasAnimation ) {
156173 prepareTransformTransitionFrom ( el , elOption , transFromProps ) ;
0 commit comments