Skip to content

Commit

Permalink
refactor(PointCloudLayer): promise.catch/finally instead of then(Call…
Browse files Browse the repository at this point in the history
…Back, errCallBack)
  • Loading branch information
ftoromanoff authored and Desplandis committed Dec 20, 2024
1 parent 07c3f63 commit b2bcb7f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Layer/PointCloudLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,12 @@ class PointCloudLayer extends GeometryLayer {
// be added nor cleaned
this.group.add(elt.obj);
elt.obj.updateMatrixWorld(true);

elt.promise = null;
}, (err) => {
if (err.isCancelledCommandException) {
elt.promise = null;
}).catch((err) => {
if (!err.isCancelledCommandException) {
return err;
}
}).finally(() => {
elt.promise = null;
});
}
}
Expand Down

0 comments on commit b2bcb7f

Please sign in to comment.