diff --git a/cocos/core/renderer/models/morph-model.ts b/cocos/core/renderer/models/morph-model.ts index fd6ece9ce1..78e72e4ef1 100644 --- a/cocos/core/renderer/models/morph-model.ts +++ b/cocos/core/renderer/models/morph-model.ts @@ -11,7 +11,7 @@ export class MorphModel extends Model { protected getMacroPatches(subModelIndex: number) : any { if (this._morphRenderingInstance) { - return this._morphRenderingInstance.requiredPatches(subModelIndex)?.concat(super.getMacroPatches(subModelIndex) ); + return this._morphRenderingInstance.requiredPatches(subModelIndex); } else { return undefined; } diff --git a/cocos/core/renderer/models/skinning-model.ts b/cocos/core/renderer/models/skinning-model.ts index 7b038ed5a2..8263057f60 100644 --- a/cocos/core/renderer/models/skinning-model.ts +++ b/cocos/core/renderer/models/skinning-model.ts @@ -245,7 +245,10 @@ export class SkinningModel extends MorphModel { } protected getMacroPatches(subModelIndex: number) : any { - return myPatches.concat(super.getMacroPatches(subModelIndex) ); + const superMacroPatches = super.getMacroPatches(subModelIndex); + if (superMacroPatches) { + return myPatches.concat(superMacroPatches); + } } protected updateAttributesAndBinding(subModelIndex : number) {