mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 22:49:18 +00:00
refactor: prevent iterating on undefined
This commit is contained in:
@@ -15,7 +15,7 @@ export default function InfoNif() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={style.interfaceList}>
|
<div className={style.interfaceList}>
|
||||||
{data?.networkInterfaces.map((nif) => (
|
{data?.networkInterfaces?.map((nif) => (
|
||||||
<span key={nif.address} onClick={() => handleClick(nif.address)} className={style.interface}>
|
<span key={nif.address} onClick={() => handleClick(nif.address)} className={style.interface}>
|
||||||
{`${nif.name} - ${nif.address}`}
|
{`${nif.name} - ${nif.address}`}
|
||||||
<IoArrowUp className={style.linkIcon} />
|
<IoArrowUp className={style.linkIcon} />
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ export default function Rundown(props: RundownProps) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!entries.length) {
|
if (statefulEntries?.length < 1) {
|
||||||
return <RundownEmpty handleAddNew={() => insertAtCursor(SupportedEvent.Event, -1)} />;
|
return <RundownEmpty handleAddNew={() => insertAtCursor(SupportedEvent.Event, -1)} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user