Skip to content

Commit

Permalink
fix BaseObject not find layer when worker Processing completed (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
deyihu authored Aug 21, 2023
1 parent 227d252 commit 39790bb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/BaseObjectTaskManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ export class BaseObjectTask {
if (this.queueMap[id]) {
const { baseObject } = this.queueMap[id];
if (baseObject && baseObject._workerLoad) {
baseObject._workerLoad(result);
const layer = baseObject.getLayer();
if (layer) {
baseObject._workerLoad(result);
} else {
console.warn(baseObject, ' worker Processing completed but removed from the layer');
}
}
delete this.queueMap[id];
}
Expand Down

0 comments on commit 39790bb

Please sign in to comment.