From bc695b5d1e3e47d32b49b0b9381d9ad8a22d1795 Mon Sep 17 00:00:00 2001 From: Yangshun Date: Sun, 27 Mar 2022 13:38:47 +0800 Subject: [PATCH] misc: fix JS errors --- contents/landscape.md | 2 +- contents/resume-case-study.md | 8 ++++---- website/src/components/CarbonAd/index.js | 2 +- website/src/pages/index.js | 17 +++++++++-------- website/src/theme/TOC/index.js | 6 +++--- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/contents/landscape.md b/contents/landscape.md index 61c8555d..3a3fc321 100644 --- a/contents/landscape.md +++ b/contents/landscape.md @@ -37,7 +37,7 @@ Top tech companies pay a ridiculous amount even for junior candidates: ### United States -
+
Salaries of top tech internships in 2016 diff --git a/contents/resume-case-study.md b/contents/resume-case-study.md index dfbe7029..836d2c19 100644 --- a/contents/resume-case-study.md +++ b/contents/resume-case-study.md @@ -10,9 +10,9 @@ To put the points mentioned in the [previous section](./resume.md) in practice. Here's the initial version of Teik Jun's resume I received from him. -
+
- Teik Jun's initial resume + Teik Jun's initial resume
Teik Jun's initial resume
@@ -52,9 +52,9 @@ Here's an improved version of Teik Jun's resume which I feel which better highli In my opinion, this improved resume is sure to capture the eyes of any recruiter in the world! -
+
- Teik Jun's improved resume + Teik Jun's improved resume
Teik Jun's improved resume
diff --git a/website/src/components/CarbonAd/index.js b/website/src/components/CarbonAd/index.js index 459e4386..7789c1e7 100644 --- a/website/src/components/CarbonAd/index.js +++ b/website/src/components/CarbonAd/index.js @@ -33,7 +33,7 @@ export default React.memo(() => { useEffect(() => { const interval = setInterval(() => { [...ref.current.children].forEach((child) => { - if (child.id.startsWith('carbonads_')) { + if (child && child.id && child.id.startsWith('carbonads_')) { ref.current.removeChild(child); } }); diff --git a/website/src/pages/index.js b/website/src/pages/index.js index c43a622e..a1a114a3 100755 --- a/website/src/pages/index.js +++ b/website/src/pages/index.js @@ -173,7 +173,7 @@ function WhatIsThisSection() {

- What is this + What is this

-