Skip to content

Commit 1cd64dd

Browse files
authored
Added a validation before mapping the users array (typescript-cheatsheets#312)
1 parent 144a5be commit 1cd64dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

website/src/pages/users.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function Users() {
1616
<p>This project is used by many folks</p>
1717
</div>
1818
<div className="row">
19-
{users.map((user) => (
19+
{users && users.length>0&& users.map((user) => (
2020
<a
2121
className="col-2"
2222
href={user.infoLink}

0 commit comments

Comments
 (0)