From 70bd1d0c2a1f70b913b9a79100fc389a87b9260f Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 23 Feb 2024 12:53:45 -0300 Subject: [PATCH] Refactor getDurationString function to use undefined instead of null --- src/frontend/src/CustomNodes/GenericNode/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 9920f2ef9..fcbf12c80 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -89,8 +89,8 @@ export default function GenericNode({ // should be empty string if no duration // else should be `Duration: ${duration}` - const getDurationString = (duration: number | null): string => { - if (duration === null) { + const getDurationString = (duration: number | undefined): string => { + if (duration === undefined) { return ""; } else { return `Duration: ${duration}`;