Skip to content

Commit 2fdb29f

Browse files
committed
fix: don't use null coalescing operator
1 parent c8d9ce3 commit 2fdb29f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function cloneObjectDeep (val, instanceClone) {
3131
}
3232
if (instanceClone || isPlainObject(val)) {
3333
const res = new val.constructor();
34-
const circulars = (whatsCircular(val) ?? []).map(c => get(val, c));
34+
const circulars = (whatsCircular(val) || []).map(c => get(val, c));
3535

3636
for (let key in val) {
3737
if (includes(circulars, val[key])) {
@@ -48,7 +48,7 @@ function cloneObjectDeep (val, instanceClone) {
4848

4949
function cloneArrayDeep (val, instanceClone) {
5050
const res = new val.constructor(val.length);
51-
const circulars = (whatsCircular(val) ?? []).map(c => get(val, c));
51+
const circulars = (whatsCircular(val) || []).map(c => get(val, c));
5252

5353
for (let i = 0; i < val.length; i++) {
5454
if (includes(circulars, val[i])) {

0 commit comments

Comments
 (0)