diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/MapMapping.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/MapMapping.vue index a36002a3be..e0489007d0 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/MapMapping.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/MapMapping.vue @@ -107,7 +107,8 @@ const finishEdit = () => { }, {}) } const oldMappedName = areaNameMap[curOriginName.value] - if (oldMappedName === curMappedName.value) { + if (!curMappedName.value || oldMappedName === curMappedName.value) { + curMappedName.value = oldMappedName return } areaNameMap[curOriginName.value] = curMappedName.value diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/map/map.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/map/map.ts index b8c295f71e..012c581189 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/map/map.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/map/map.ts @@ -150,7 +150,7 @@ export class Map extends L7PlotChartView { .map(key => f.properties[key]) .filter(Boolean) .join('@') - if (isEmpty(names)) { + if (isEmpty(names) || !gadmName) { return true } return names.replace(/@[^@]*$/, '') === gadmName