Skip to content

Commit dc3d08e

Browse files
Mat TaylorMat Taylor
authored andcommitted
clone
1 parent d4f82b5 commit dc3d08e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

objix.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,11 @@ const
5858
},
5959

6060
clone(d, e) {
61-
return (!e && d == -1 && this.size() > 10) ? this.try(structuredClone, () => this.clone(d,1))
62-
: !this.is(O) ? this.valueOf()
61+
return !this.is(O) ? this.valueOf()
62+
: (!e && d == -1 && this.size() > 10) ? this.try(structuredClone, () => this.clone(d,1))
6363
: [O,Array].has(this[C]) ? this.map(v => (d && v) ? v.clone(d-1) : v)
6464
: new this[C](this)
65-
},
66-
65+
},
6766
join(...a) {
6867
let r = A({}, this)
6968
for(let o of a) K(o).map(k => r[k] &&= [].concat(r[k], o[k]))

0 commit comments

Comments
 (0)