Skip to content

Add condition when clearing polyline location properties#58

Merged
philip-khaisman merged 1 commit into
masterfrom
fix-polylinelayer-clear-error
Jul 17, 2026
Merged

Add condition when clearing polyline location properties#58
philip-khaisman merged 1 commit into
masterfrom
fix-polylinelayer-clear-error

Conversation

@philip-khaisman

@philip-khaisman philip-khaisman commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

When starting the webtak plugin we call the discovery service and create the necessary layers for the results. It's not guaranteed that these layers will receive data. For example if i have a system with only historical data and i never play it back. This causes a problem because if the View is ever reset (either when the broadcast channel receives a time changed or closed error) it makes a call to clear all the layers. The layer clear previously assumed that it had received data so it would crash when trying to access a property that was never set (propsById). The fix adds an if condition to check if the property exists before accessing it. If it doesn't exist there is nothing to clear.

Tested by running a db file which i will provide in replay mode. It had 5 minutes of data. After 5 minutes i would see the error as a webpack modal. This is because the socket is closed after 5 minutes. With the fix you will not see the error and they replay driver should loop without error

@philip-khaisman philip-khaisman linked an issue Jul 3, 2026 that may be closed by this pull request
@philip-khaisman
philip-khaisman requested a review from Cardy2 July 3, 2026 18:39
@philip-khaisman
philip-khaisman marked this pull request as ready for review July 3, 2026 18:39

@Cardy2 Cardy2 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@philip-khaisman
philip-khaisman merged commit ad002f6 into master Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix polyline clear method to handle layers with no data

2 participants