Skip to content

Commit 48ae7b2

Browse files
committed
handle undefined position
1 parent d49984b commit 48ae7b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/web/src/components/InternInfo/InternInfo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {
99
} from '@internship-app/types';
1010
import { DataGrid, GridColDef } from '@mui/x-data-grid';
1111
import moment from 'moment';
12-
import { steps } from '../../constants/interviewConstants';
1312

13+
import { steps } from '../../constants/interviewConstants';
1414
import styles from './index.module.css';
1515

1616
interface InternInfoProps {
@@ -148,7 +148,7 @@ export const InternInfo = ({ intern }: InternInfoProps) => {
148148

149149
if (categoryCompare !== 0) return categoryCompare;
150150

151-
return a.position! - b.position!;
151+
return (a.position ?? 0) - (b.position ?? 0);
152152
})
153153
.map((item: Answer) => {
154154
if (!item.value) return null;

0 commit comments

Comments
 (0)