mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 08:53:51 +00:00
refract: cleanup undefined state
This commit is contained in:
@@ -17,7 +17,7 @@ export default function TimeInput(props) {
|
||||
const [value, setValue] = useState(props.value);
|
||||
|
||||
useEffect(() => {
|
||||
if (props.value === null) return;
|
||||
if (props.value == null) return;
|
||||
setValue(props.value);
|
||||
}, [props.value]);
|
||||
|
||||
|
||||
@@ -20,10 +20,11 @@ export default function DelayBlock(props) {
|
||||
eventsHandler('delete', data.id);
|
||||
};
|
||||
|
||||
let delayValue = (data.duration != null) ? millisToMinutes(data.duration) : undefined;
|
||||
return (
|
||||
<div className={style.delay}>
|
||||
<TimeInput
|
||||
value={millisToMinutes(data.duration)}
|
||||
value={delayValue}
|
||||
submitHandler={submitHandler}
|
||||
/>
|
||||
<div className={style.actionOverlay}>
|
||||
|
||||
Reference in New Issue
Block a user