Skip to content

Commit

Permalink
fix: don't use null coalescing operator
Browse files Browse the repository at this point in the history
  • Loading branch information
emahuni committed Aug 2, 2022
1 parent c8d9ce3 commit db3fb60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function cloneObjectDeep (val, instanceClone) {
}
if (instanceClone || isPlainObject(val)) {
const res = new val.constructor();
const circulars = (whatsCircular(val) ?? []).map(c => get(val, c));
const circulars = (whatsCircular(val) || []).map(c => get(val, c));

for (let key in val) {
if (includes(circulars, val[key])) {
Expand Down

0 comments on commit db3fb60

Please sign in to comment.