mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-21 11:20:24 +02:00
pastojs: fixed insert array
This commit is contained in:
parent
97a20217c1
commit
fafb26deae
3
compiler/utils/pas2js/dist/rtl.js
vendored
3
compiler/utils/pas2js/dist/rtl.js
vendored
@ -1042,7 +1042,8 @@ var rtl = {
|
|||||||
|
|
||||||
arrayInsert: function(item, arr, index){
|
arrayInsert: function(item, arr, index){
|
||||||
if (arr){
|
if (arr){
|
||||||
return arr.splice(index,0,item);
|
arr.splice(index,0,item);
|
||||||
|
return arr;
|
||||||
} else {
|
} else {
|
||||||
return [item];
|
return [item];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user