Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Fix invalid null value access
Browse files Browse the repository at this point in the history
  • Loading branch information
khelif96 committed Dec 19, 2023
1 parent c53faad commit 1e410de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/task/files_tables.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe("files table", () => {
const FILES_ROUTE = "/task/evergreen_ubuntu1604_89/files";
const FILES_ROUTE_WITHOUT_FILES =
"/task/evergreen_ubuntu1604_test_model_commitqueue_patch_5e823e1f28baeaa22ae00823d83e03082cd148ab_5e4ff3abe3c3317e352062e4_20_02_21_15_13_48/files ";
"/task/evergreen_ubuntu1604_test_model_commitqueue_patch_5e823e1f28baeaa22ae00823d83e03082cd148ab_5e4ff3abe3c3317e352062e4_20_02_21_15_13_48/files";

it("File names under name column should link to a new tab", () => {
cy.visit(FILES_ROUTE);
Expand Down
9 changes: 7 additions & 2 deletions src/pages/task/taskTabs/FileTable/GroupedFileTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ const columns = (
disabled={value.row.original.urlParsley === null}
size="small"
ref={
options.index === value.row.index ? options.triggerRef : null
options && options.index === value.row.index
? options.triggerRef
: null
}
onClick={() => {
taskAnalytics.sendEvent({
Expand Down Expand Up @@ -106,7 +108,10 @@ const GroupedFileTable: React.FC<GroupedFileTableProps> = ({
triggerRef: parsleyLinkRef,
index: firstParsleyFileIndex,
}
: null
: {
triggerRef: null,
index: -1,
}
),
[taskAnalytics, firstParsleyFileIndex]
);
Expand Down

0 comments on commit 1e410de

Please sign in to comment.