fix(curriculum): remove unnecessary optional chaining (#53467)

This commit is contained in:
Israel Lopez 2024-01-31 00:08:50 -06:00 committed by GitHub
parent 293e2437f7
commit 4646c2a1cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,7 +7,7 @@ dashedName: step-76
# --description--
If there is a match then set `userData?.currentSong` to `null` and `userData?.songCurrentTime` to `0`.
If there is a match then set `userData.currentSong` to `null` and `userData.songCurrentTime` to `0`.
After that, call the `pauseSong()` function to stop the playback and the `setPlayerDisplay()` function to update the player display.
@ -19,13 +19,13 @@ You should not modify the existing `if` statement and its content.
assert.match(code, /if\s*\(userData\?\.currentSong\?\.id\s*===\s*id\)\s*\{\s*.*\s*.*\s*.*\s*.*\s*\}/)
```
You should set `userData?.currentSong` to `null`.
You should set `userData.currentSong` to `null`.
```js
assert.match(code, /if\s*\(userData\?\.currentSong\?\.id\s*===\s*id\)\s*\{\s*userData\.currentSong\s*=\s*null;?\s*.*\s*.*\s*.*\s*\}/)
```
You should set `userData?.songCurrentTime` to `0`.
You should set `userData.songCurrentTime` to `0`.
```js
assert.match(code, /if\s*\(userData\?\.currentSong\?\.id\s*===\s*id\)\s*\{\s*userData\.currentSong\s*=\s*null;?\s*userData\.songCurrentTime\s*=\s*0;?\s*.*\s*.*\s*\}/)