Skip to content

Commit 8f46052

Browse files
Use optional call instead of explicit if-then
1 parent b210d83 commit 8f46052

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

extensions/ql-vscode/src/view/results/locations/ClickableLocation.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ export function ClickableLocation({
2626
jumpToLocation(loc, databaseUri);
2727
e.preventDefault();
2828
e.stopPropagation();
29-
if (jumpToLocationCallback) {
30-
jumpToLocationCallback();
31-
}
29+
jumpToLocationCallback?.();
3230
},
3331
[loc, databaseUri, jumpToLocationCallback],
3432
);

0 commit comments

Comments
 (0)