Skip to content

Commit

Permalink
fix: remove messageBodyRef check
Browse files Browse the repository at this point in the history
  • Loading branch information
KristinAoki committed Jan 31, 2025
1 parent fe7dac2 commit b134f5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/course-home/outline-tab/widgets/WelcomeMessage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ const WelcomeMessage = ({ courseId, nextElementRef }) => {
actions={messageCanBeShortened ? [
<Button
onClick={() => {

Check warning on line 61 in src/course-home/outline-tab/widgets/WelcomeMessage.jsx

View check run for this annotation

Codecov / codecov/patch

src/course-home/outline-tab/widgets/WelcomeMessage.jsx#L61

Added line #L61 was not covered by tests
if (showShortMessage && messageBodyRef.current) {
messageBodyRef.current.focus();
if (showShortMessage) {
messageBodyRef.current?.focus();

Check warning on line 63 in src/course-home/outline-tab/widgets/WelcomeMessage.jsx

View check run for this annotation

Codecov / codecov/patch

src/course-home/outline-tab/widgets/WelcomeMessage.jsx#L63

Added line #L63 was not covered by tests
}

setShowShortMessage(!showShortMessage);

Check warning on line 66 in src/course-home/outline-tab/widgets/WelcomeMessage.jsx

View check run for this annotation

Codecov / codecov/patch

src/course-home/outline-tab/widgets/WelcomeMessage.jsx#L66

Added line #L66 was not covered by tests
Expand Down

0 comments on commit b134f5c

Please sign in to comment.