mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
simple translator: bug fix
"Edit/Add a segment..." stopped working at some point. (Importing text still worked.)
This commit is contained in:
@@ -962,10 +962,12 @@ function delete_ix(old,ix) {
|
|||||||
|
|
||||||
function insert_ix(old,ix,x) {
|
function insert_ix(old,ix,x) {
|
||||||
var a=[];
|
var a=[];
|
||||||
|
var done=false;
|
||||||
for(var i in old) {
|
for(var i in old) {
|
||||||
if(i==ix) a.push(x);
|
if(i==ix) { a.push(x); done=true; }
|
||||||
a.push(old[i])
|
a.push(old[i])
|
||||||
}
|
}
|
||||||
|
if(!done) a.push(x)
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user