Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Resolved error when getting length for Record type" #16233

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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