Skip to content

Commit

Permalink
Refactor formatDateRanges function in date-ranges.js
Browse files Browse the repository at this point in the history
  • Loading branch information
PatchesMaps committed Nov 8, 2024
1 parent fb5a635 commit 5bc6c5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/js/components/layer/info/date-ranges.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ListGroup, ListGroupItem, Spinner } from 'reactstrap';
import Scrollbar from '../../util/scrollbar';
import { coverageDateFormatter } from '../../../modules/date/util';

const formatDateRanges = (dateRanges) => dateRanges.map(({ startDate, endDate }) => [startDate, endDate]);
const formatDateRanges = (dateRanges = []) => dateRanges.map(({ startDate, endDate }) => [startDate, endDate]);

export default function DateRanges ({ layer }) {
const [showRanges, setShowRanges] = useState(false);
Expand Down

0 comments on commit 5bc6c5e

Please sign in to comment.