From 71bb8ec748ce9860a44f79c2358c403a670b116e Mon Sep 17 00:00:00 2001 From: unknown <3454201525@qq.com> Date: Thu, 26 Dec 2024 21:17:50 +0800 Subject: [PATCH] Fix: Ensure coord_path is a string in DirectSelect.onVertex --- src/modes/direct_select.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modes/direct_select.js b/src/modes/direct_select.js index 32f0a3483..53d72c193 100644 --- a/src/modes/direct_select.js +++ b/src/modes/direct_select.js @@ -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];