@@ -27,6 +27,8 @@ type AlertTableProps = ResultTableProps & {
2727} ;
2828
2929export function AlertTable ( props : AlertTableProps ) {
30+ const { databaseUri, resultSet } = props ;
31+
3032 const scroller = useRef < ScrollIntoViewHelper | undefined > ( undefined ) ;
3133 if ( scroller . current === undefined ) {
3234 scroller . current = new ScrollIntoViewHelper ( ) ;
@@ -108,7 +110,7 @@ export function AlertTable(props: AlertTableProps) {
108110
109111 const handleNavigationEvent = ( event : NavigateMsg ) => {
110112 const key = getNewSelection ( selectedItem , event . direction ) ;
111- const data = props . resultSet . interpretation . data ;
113+ const data = resultSet . interpretation . data ;
112114
113115 // Check if the selected node actually exists (bounds check) and get its location if relevant
114116 let jumpLocation : Sarif . Location | undefined ;
@@ -131,10 +133,10 @@ export function AlertTable(props: AlertTableProps) {
131133 if ( jumpLocation !== undefined ) {
132134 const parsedLocation = parseSarifLocation (
133135 jumpLocation ,
134- props . resultSet . interpretation . sourceLocationPrefix ,
136+ resultSet . interpretation . sourceLocationPrefix ,
135137 ) ;
136138 if ( ! isNoLocation ( parsedLocation ) ) {
137- jumpToLocation ( parsedLocation , props . databaseUri ) ;
139+ jumpToLocation ( parsedLocation , databaseUri ) ;
138140 }
139141 }
140142
@@ -171,8 +173,6 @@ export function AlertTable(props: AlertTableProps) {
171173 } ;
172174 } , [ ] ) ;
173175
174- const { databaseUri, resultSet } = props ;
175-
176176 const { numTruncatedResults, sourceLocationPrefix } =
177177 resultSet . interpretation ;
178178
0 commit comments