Skip to content

Commit

Permalink
fix calibration menu in controller settings
Browse files Browse the repository at this point in the history
  • Loading branch information
AAGaming00 committed Jul 24, 2022
1 parent c9bf8d3 commit 2004bde
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/router-hook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ class RouterHook extends Logger {
const DeckyWrapper = ({ children }: { children: ReactElement }) => {
const { routes } = useDeckyRouterState();

const routerIndex = children.props.children[0].props.children.length - 1;
const routerIndex = children.props.children[0].props.children.length;
if (
!children.props.children[0].props.children[routerIndex].length ||
children.props.children[0].props.children !== routes.size
!children.props.children[0].props.children[routerIndex]?.length ||
children.props.children[0].props.children[routerIndex].length !== routes.size
) {
const newRouterArray: ReactElement[] = [];
routes.forEach(({ component, props }, path) => {
Expand Down

0 comments on commit 2004bde

Please sign in to comment.