TaskEdit: use null coalescing instead of ||.

It technically works because undefined happens to be falsey, but still bad
practice and can lead to errors (especially when copy-pasting).
master
Tom Hacohen 5 years ago
parent 54302c4c07
commit 18967ddb16

@ -94,7 +94,7 @@ class TaskEdit extends React.PureComponent<PropsType> {
this.state.uid = event.uid;
this.state.title = event.title ? event.title : '';
this.state.status = event.status;
this.state.priority = event.priority || TaskPriorityType.Undefined;
this.state.priority = event.priority ?? TaskPriorityType.Undefined;
if (event.startDate) {
this.state.allDay = event.startDate.isDate;
this.state.start = event.startDate.convertToZone(ICAL.Timezone.localTimezone).toJSDate();

Loading…
Cancel
Save