Skip to content

Commit 6e5673c

Browse files
committed
Make code a little less sloppy
1 parent 548853f commit 6e5673c

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

react/CodeBlock.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ const CodeBlock = (props) => {
6666
}
6767

6868
module.exports = CodeBlock
69-
70-
if (typeof window === 'undefined') {
71-
} else {
69+
if (typeof window !== 'undefined') {
7270
const componentContainers = document.querySelectorAll('.react-component-CodeBlock')
7371

7472
for (const componentContainer of componentContainers) {

react/CodeEditor.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ const CodeEditor = (props) => {
2626
)
2727
}
2828

29-
if (typeof window === 'undefined') {
30-
} else {
29+
if (typeof window !== 'undefined') {
3130
const componentContainers = document.querySelectorAll('.react-component-CodeEditor')
3231

3332
for (const componentContainer of componentContainers) {

react/CoolTable.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ const CoolTable = function () {
2727
)
2828
}
2929

30-
if (typeof window === 'undefined') {
31-
} else {
30+
if (typeof window !== 'undefined') {
3231
const componentContainers = document.querySelectorAll('.react-component-CoolTable')
3332

3433
for (const componentContainer of componentContainers) {

0 commit comments

Comments
 (0)