Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit 55dd611

Browse files
committed
fix(type): make a new isNullish function
1 parent 7ba61f6 commit 55dd611

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

aqueductcore/frontend/src/components/molecules/LogViewer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { isNullish } from "@apollo/client/cache/inmemory/helpers";
21
import { Box, styled } from "@mui/material";
32

43
import { logType } from "types/componentTypes";
4+
import { isNullish } from "helper/functions";
55

66
interface LogViewerProps {
77
log: logType[]

aqueductcore/frontend/src/helper/functions.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,8 @@ export function stableSort<T>(array: readonly T[], comparator: (a: T, b: T) => n
8484
return a[1] - b[1];
8585
});
8686
return stabilizedThis.map((el) => el[0]);
87-
}
87+
}
88+
89+
export function isNullish(value: unknown): value is null | undefined {
90+
return value === null || value === undefined;
91+
}

0 commit comments

Comments
 (0)