Skip to content

Commit b03da2d

Browse files
committed
Fix an issue where projectRawData can be undefined, resulting in an error in the conditional check
1 parent fbebd3c commit b03da2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/views/DetailedProjectView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const DetailedProjectView: React.FC = () => {
2424

2525
useEffect(() => {
2626
setIsLoading(true);
27-
fetch(`https://raw.githubusercontent.com/${project.slug}/main/README.md`)
27+
fetch(`https://raw.githubusercontent.com/${project.slug}/dev/README.md`)
2828
.then(response => response.text())
2929
.then(response =>
3030
setProjectRawData(response.split('<!-- End of Section -->'))
@@ -74,7 +74,7 @@ const DetailedProjectView: React.FC = () => {
7474
{
7575
<MarkdownRenderedComponent
7676
content={
77-
projectRawData[3].length > 4
77+
projectRawData[3]?.length > 4
7878
? projectRawData[3]
7979
: 'No instructions for this project.'
8080
}

0 commit comments

Comments
 (0)