Skip to content

Commit

Permalink
provide default values so list.sort does not fail
Browse files Browse the repository at this point in the history
  • Loading branch information
zburke committed Jun 10, 2024
1 parent 6ab1a0e commit 72bfe6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/About/AboutModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import css from './About.css';


const AboutInterfaces = ({ list }) => {
const AboutInterfaces = ({ list = [] }) => {
list.sort((a, b) => a.name.localeCompare(b.name));
return (
<List
Expand All @@ -23,7 +23,7 @@ AboutInterfaces.propTypes = {
list: PropTypes.arrayOf(PropTypes.object),
};

const AboutModules = ({ list }) => {
const AboutModules = ({ list = [] }) => {
list.sort((a, b) => a.name.localeCompare(b.name));

return (
Expand Down

0 comments on commit 72bfe6b

Please sign in to comment.