From 299215b5817125c90a5767e8713a32da8e1b9286 Mon Sep 17 00:00:00 2001 From: ftoromanoff Date: Tue, 1 Oct 2024 10:38:23 +0200 Subject: [PATCH] refactor(PointCloudLayer): promise.catch/finally instead of then(CallBack, errCallBack) --- src/Layer/PointCloudLayer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Layer/PointCloudLayer.js b/src/Layer/PointCloudLayer.js index 9d6aabaf8c..a087bd77a0 100644 --- a/src/Layer/PointCloudLayer.js +++ b/src/Layer/PointCloudLayer.js @@ -294,12 +294,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; }); } }