mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-13 23:09:31 -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) {
|
||||
var a=[];
|
||||
var done=false;
|
||||
for(var i in old) {
|
||||
if(i==ix) a.push(x);
|
||||
if(i==ix) { a.push(x); done=true; }
|
||||
a.push(old[i])
|
||||
}
|
||||
if(!done) a.push(x)
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user