only concat none undefiend patch macros

This commit is contained in:
minggo
2020-06-03 16:26:05 +08:00
parent f44822c960
commit 75331d43fc
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -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;
}
+4 -1
View File
@@ -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) {