From 0b737bf9c6febabe274c72840d6580c96f60f1f5 Mon Sep 17 00:00:00 2001 From: Sendou <38327916+Sendouc@users.noreply.github.com> Date: Fri, 19 Jun 2020 15:51:10 +0300 Subject: [PATCH] bug fix analyzer when coming from builds --- frontend-react/src/components/analyzer/BuildAnalyzerPage.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend-react/src/components/analyzer/BuildAnalyzerPage.tsx b/frontend-react/src/components/analyzer/BuildAnalyzerPage.tsx index fa480be3a..28dcecc53 100644 --- a/frontend-react/src/components/analyzer/BuildAnalyzerPage.tsx +++ b/frontend-react/src/components/analyzer/BuildAnalyzerPage.tsx @@ -22,7 +22,10 @@ const BuildAnalyzerPage: React.FC = () => { const { themeColor, grayWithShade } = useContext(MyThemeContext) const location = useLocation() const [build, setBuild] = useState>(getBuildFromUrl()) - const [otherBuild, setOtherBuild] = useState>(defaultBuild) + const [otherBuild, setOtherBuild] = useState>({ + ...defaultBuild, + weapon: getBuildFromUrl().weapon, + }) const [showOther, setShowOther] = useState(false) const [showNotActualProgress, setShowNotActualProgress] = useState(false) const [startChartsAtZero, setStartChartsAtZero] = useState(true)