Skip to content

Commit

Permalink
Fix: Ensure coord_path is a string in DirectSelect.onVertex
Browse files Browse the repository at this point in the history
  • Loading branch information
BlockCnFuture committed Dec 26, 2024
1 parent 5d40c90 commit 71bb8ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modes/direct_select.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ DirectSelect.stopDragging = function(state) {
DirectSelect.onVertex = function (state, e) {
this.startDragging(state, e);
const about = e.featureTarget.properties;
if (typeof about.coord_path !== 'string') about.coord_path = String(about.coord_path);
const selectedIndex = state.selectedCoordPaths.indexOf(about.coord_path);
if (!isShiftDown(e) && selectedIndex === -1) {
state.selectedCoordPaths = [about.coord_path];
Expand Down

0 comments on commit 71bb8ec

Please sign in to comment.