js: fix condition error cause print error log

This commit is contained in:
pengfei.zhou
2023-08-04 16:42:59 +08:00
committed by osborn
parent 411ca694e4
commit a9c5281cc9
6 changed files with 11 additions and 11 deletions

View File

@@ -222,12 +222,12 @@ export class Panel {
return diryData;
}
onRenderFinished() {
this.callingRenderFinishedCallback = false;
this.callingRenderFinishedCallback = true;
this.onRenderFinishedCallback.forEach(e => {
e();
});
this.onRenderFinishedCallback.length = 0;
this.callingRenderFinishedCallback = true;
this.callingRenderFinishedCallback = false;
}
addOnRenderFinishedCallback(cb) {
if (this.callingRenderFinishedCallback) {