Skip to content

Commit

Permalink
fix: Added conditional for undefined case instead of null
Browse files Browse the repository at this point in the history
  • Loading branch information
rijuma committed Oct 25, 2023
1 parent 7712a78 commit 382f101
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const iconTypeMapping = {
const defaultIcon = Article;

const CoursewareSearchResults = ({ intl, results }) => {
if (!results.length) {
if (!results?.length) {
return (
<div className="courseware-search-results">
<p className="courseware-search-results__empty" data-testid="no-results">{intl.formatMessage(messages.searchResultsNone)}</p>
Expand Down

0 comments on commit 382f101

Please sign in to comment.