Skip to content

Commit 8ac5560

Browse files
authored
fix(curriculum): remove TypeError messages (freeCodeCamp#59529)
1 parent 292b7e9 commit 8ac5560

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Diff for: curriculum/challenges/english/25-front-end-development/lab-business-card/6690e10ebe2181212abc9652.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -247,41 +247,40 @@ assert.equal(document.querySelector('.social-media h2').textContent, 'Connect wi
247247
Inside the `.social-media` element, there should be an `a` element with the text `Twitter`.
248248
249249
```js
250-
assert.equal(document.querySelectorAll(".social-media a")[0].textContent, 'Twitter');
250+
assert.equal(document.querySelectorAll(".social-media a")[0]?.textContent, 'Twitter');
251251
```
252252
253253
The Twitter `href` should point to a valid link.
254254
255255
```js
256-
assert.isAbove(document.querySelectorAll('.social-media a')[0].getAttribute('href').length, 0);
256+
assert.isAbove(document.querySelectorAll('.social-media a')[0]?.getAttribute('href')?.length, 0);
257257
```
258258
259259
Inside the `.social-media` element, there should be an `a` element with the text `LinkedIn`.
260260
261261
```js
262262

263-
assert.equal(document.querySelectorAll(".social-media a")[1].textContent, 'LinkedIn');
263+
assert.equal(document.querySelectorAll(".social-media a")[1]?.textContent, 'LinkedIn');
264264
```
265265
266266
The LinkedIn `href` should point to a valid link.
267267
268268
```js
269-
assert.isAbove(document.querySelectorAll('.social-media a')[1].getAttribute('href').length, 0);
269+
assert.isAbove(document.querySelectorAll('.social-media a')[1]?.getAttribute('href')?.length, 0);
270270
```
271271
272272
Inside the `.social-media` element, there should be an `a` element with the text `GitHub`.
273273
274274
```js
275-
assert.equal(document.querySelectorAll(".social-media a")[2].textContent, 'GitHub');
275+
assert.equal(document.querySelectorAll(".social-media a")[2]?.textContent, 'GitHub');
276276
```
277277
278278
The GitHub `href` should point to a valid link.
279279
280280
```js
281-
assert.isAbove(document.querySelectorAll('.social-media a')[2].getAttribute('href').length, 0);
281+
assert.isAbove(document.querySelectorAll('.social-media a')[2]?.getAttribute('href')?.length, 0);
282282
```
283283
284-
285284
# --seed--
286285
287286
## --seed-contents--

0 commit comments

Comments
 (0)