mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-11 23:45:11 +08:00
refactor(migration): 简化父行星 ID 的映射更新逻辑
- 移除冗余的 idMap.has 检查,直接使用 idMap.get 获取新 ID
This commit is contained in:
@@ -141,12 +141,10 @@ export const migrateGameData = (): void => {
|
||||
const posKey = `${planet.position.galaxy}:${planet.position.system}:${planet.position.position}`
|
||||
const mapKey = `${planet.parentPlanetId}_${posKey}`
|
||||
|
||||
if (idMap.has(mapKey)) {
|
||||
const newParentId = idMap.get(mapKey)
|
||||
if (newParentId) {
|
||||
planet.parentPlanetId = newParentId
|
||||
needsSave = true
|
||||
}
|
||||
const newParentId = idMap.get(mapKey)
|
||||
if (newParentId) {
|
||||
planet.parentPlanetId = newParentId
|
||||
needsSave = true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user