-
-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Labels
awaiting feedbackAwaiting feedback from a member of the communityAwaiting feedback from a member of the communitybugSomething isn't workingSomething isn't working
Description
Describe the bug
@JamesLMilner Seeing a regression in the recently released version when a feature is obtained and then removed.
The finish handling event is here:
https://github.com/dfpc-coe/CloudTAK/blob/main/api/web/src/stores/modules/draw.ts#L153-L270
But I've tracked down the error to the following TerraDraw call:
https://github.com/dfpc-coe/CloudTAK/blob/main/api/web/src/stores/modules/draw.ts#L411
The error appears to be thrown outside of the current scope as wrapping the call with
423 try {
424 return this.draw.removeFeatures([id]);
425 } catch (err) {
426 console.error('Error removing feature', err);
427 }
does not capture the error and the error bubbles up to the generic error handler.
I've confirmed that 1.20.0 is unaffected and have pinned to that release.
error { target: Window, isTrusted: true, message: "Error: No feature with this id (f9ccb04a-7b2d-462d-be25-3ddfcc4b1c4e), can not get properties copy", filename: "http://localhost:8080/node_modules/.vite/deps/chunk-7SES3HDX.js?v=dc640590", lineno: 2597, colno: 20, error: Error, srcElement: Window, currentTarget: Window, eventPhase: 2, … }
bubbles: true
cancelBubble: false
cancelable: true
colno: 20
composed: false
currentTarget: null
defaultPrevented: true
error: Error: No feature with this id (f9ccb04a-7b2d-462d-be25-3ddfcc4b1c4e), can not get properties copy
eventPhase: 0
explicitOriginalTarget: <canvas class="maplibregl-canvas" tabindex="0" aria-label="Map" role="region" width="3456" height="1232" style="width: 1728px; height: 616px;">
filename: "http://localhost:8080/node_modules/.vite/deps/chunk-7SES3HDX.js?v=dc640590"
isTrusted: true
lineno: 2597
message: "Error: No feature with this id (f9ccb04a-7b2d-462d-be25-3ddfcc4b1c4e), can not get properties copy"
originalTarget: Window http://localhost:8080/#13.7/39.67975/-105.91259
returnValue: false
srcElement: Window http://localhost:8080/#13.7/39.67975/-105.91259
target: Window http://localhost:8080/#13.7/39.67975/-105.91259
timeStamp: 224260
type: "error"
<get isTrusted()>: function isTrusted()
<prototype>: ErrorEventPrototype { message: Getter, filename: Getter, lineno: Getter, … }
Terra Draw npm version
1.21.0
Metadata
Metadata
Assignees
Labels
awaiting feedbackAwaiting feedback from a member of the communityAwaiting feedback from a member of the communitybugSomething isn't workingSomething isn't working