diff --git a/CHANGELOG.md b/CHANGELOG.md index bc3e5f6c..59875928 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ +## [v1.78.1](https://github.com/wanderer-industries/wanderer/compare/v1.78.0...v1.78.1) (2025-09-24) + + + + +### Bug Fixes: + +* pr feedback + +* removed wormhole only logic error + ## [v1.78.0](https://github.com/wanderer-industries/wanderer/compare/v1.77.19...v1.78.0) (2025-09-23) diff --git a/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx b/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx index 82a56575..f9be34df 100644 --- a/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx +++ b/assets/js/hooks/Mapper/components/mapInterface/widgets/WSystemKills/WSystemKills.tsx @@ -16,8 +16,21 @@ const SystemKillsContent = () => { } = useMapRootState(); const [systemId] = selectedSystems || []; + const whCacheRef = useMemo(() => new Map(), []); - const systemStaticInfo = getSystemStaticInfo(systemId)!; + const isWormholeSystem = useCallback( + (systemId: number): boolean => { + const cached = whCacheRef.get(systemId); + if (cached !== undefined) return cached; + + const info = getSystemStaticInfo(systemId); + const isWH = info?.system_class != null ? isWormholeSpace(Number(info.system_class)) : false; + + whCacheRef.set(systemId, isWH); + return isWH; + }, + [whCacheRef], + ); const { kills, isLoading, error } = useSystemKills({ systemId, @@ -30,15 +43,9 @@ const SystemKillsContent = () => { const showLoading = isLoading && kills.length === 0; const filteredKills = useMemo(() => { - if (!settingsKills.whOnly || !settingsKills.showAll) return kills; - return kills.filter(kill => { - if (!systemStaticInfo) { - console.warn(`System with id ${kill.solar_system_id} not found.`); - return false; - } - return isWormholeSpace(systemStaticInfo.system_class); - }); - }, [kills, settingsKills.whOnly, systemStaticInfo, settingsKills.showAll]); + if (!settingsKills.whOnly) return kills; + return kills.filter(kill => isWormholeSystem(Number(kill.solar_system_id))); + }, [kills, settingsKills.whOnly, isWormholeSystem]); if (!isSubscriptionActive) { return ( diff --git a/mix.exs b/mix.exs index 0a95f63b..31be0a79 100644 --- a/mix.exs +++ b/mix.exs @@ -3,7 +3,7 @@ defmodule WandererApp.MixProject do @source_url "https://github.com/wanderer-industries/wanderer" - @version "1.78.0" + @version "1.78.1" def project do [