Skip to content

Commit

Permalink
Revert "Resolved error when getting length for Record type (#16213)"
Browse files Browse the repository at this point in the history
This reverts commit b57d5ab.
  • Loading branch information
troublemaker52025 authored Sep 8, 2023
1 parent 3c0aaf5 commit 0fe2775
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cocos/render-scene/scene/submodel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,10 @@ export class SubModel {
if (!this._globalPatches && pipelinePatches.length === 0) {
return;
} else if (pipelinePatches.length) {
if (this._globalPatches) {
if (this._globalPatches && pipelinePatches.length === this._globalPatches.length) {
const globalPatches = Object.entries(this._globalPatches);
if (pipelinePatches.length === globalPatches.length) {
const patchesStateUnchanged = JSON.stringify(pipelinePatches.sort()) === JSON.stringify(globalPatches.sort());
if (patchesStateUnchanged) return;
}
const patchesStateUnchanged = JSON.stringify(pipelinePatches.sort()) === JSON.stringify(globalPatches.sort());
if (patchesStateUnchanged) return;
}
}
this._globalPatches = pipeline.macros;
Expand Down

0 comments on commit 0fe2775

Please sign in to comment.