Refactor getDurationString function to use undefined instead of null
This commit is contained in:
parent
1565ad95a3
commit
70bd1d0c2a
1 changed files with 2 additions and 2 deletions
|
|
@ -89,8 +89,8 @@ export default function GenericNode({
|
||||||
|
|
||||||
// should be empty string if no duration
|
// should be empty string if no duration
|
||||||
// else should be `Duration: ${duration}`
|
// else should be `Duration: ${duration}`
|
||||||
const getDurationString = (duration: number | null): string => {
|
const getDurationString = (duration: number | undefined): string => {
|
||||||
if (duration === null) {
|
if (duration === undefined) {
|
||||||
return "";
|
return "";
|
||||||
} else {
|
} else {
|
||||||
return `Duration: ${duration}`;
|
return `Duration: ${duration}`;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue