Skip to content

Commit 52b77e7

Browse files
committed
null+1 === 1 (who would have thought?)
1 parent 838db6f commit 52b77e7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/algorithms/controllers/tests/insertionSort.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
/* eslint-disable no-undef */
77

8-
import insertionSort from '../insertionSort';
8+
import insertionSort from '../isort';
99

1010
// Simple stub for the chunker
1111
const chunker = {

src/components/DataStructures/Array/Array1DRenderer/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class Array1DRenderer extends Array2DRenderer {
164164
col.style && col.style.textStyle,
165165
)}
166166
>
167-
{(j == columnGapAt ? ' '
167+
{(j === columnGapAt ? ' '
168168
: this.toString(col.value))}
169169
</motion.span>
170170
{ (ALGOS_USING_FLOAT_BOX.includes(algo) && (
@@ -207,8 +207,8 @@ class Array1DRenderer extends Array2DRenderer {
207207
return (
208208
<div className={classes(styles.col, styles.index)} key={i}>
209209
<span className={styles.value}>
210-
{(i-1 == columnGapAt ? ' '
211-
: i-1 == columnGapAt+1 ? indexAfterGap
210+
{(i-1 === columnGapAt ? ' '
211+
: i-2 === columnGapAt ? indexAfterGap
212212
: i
213213
)}
214214
</span>

0 commit comments

Comments
 (0)