Avoid extra copy in JS when inserting.
This commit is contained in:
parent
955954a89f
commit
e7918fe6e5
1 changed files with 1 additions and 1 deletions
|
|
@ -1411,7 +1411,7 @@ proc insert*[T](x: var seq[T], item: T, i = 0.Natural) {.noSideEffect.} =
|
|||
defaultImpl()
|
||||
else:
|
||||
when defined(js):
|
||||
var it = item
|
||||
var it : T
|
||||
{.emit: "`x`[`x`_Idx].splice(`i`, 0, `it`);".}
|
||||
else:
|
||||
defaultImpl()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue