Fix #17347 - TypeErrors in some special cases on index management
One was added in #14984 Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
c2967d6c6a
commit
77820a32b6
@ -163,8 +163,10 @@ Indexes.removeColumnFromIndex = function (colIndex) {
|
||||
// Remove column from index array.
|
||||
var sourceLength = sourceArray[previousIndex[1]].columns.length;
|
||||
for (var i = 0; i < sourceLength; i++) {
|
||||
if (sourceArray[previousIndex[1]].columns[i].col_index === colIndex) {
|
||||
sourceArray[previousIndex[1]].columns.splice(i, 1);
|
||||
if (i in sourceArray[previousIndex[1]].columns) {
|
||||
if (sourceArray[previousIndex[1]].columns[i].col_index === colIndex) {
|
||||
sourceArray[previousIndex[1]].columns.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -827,7 +829,11 @@ AJAX.registerOnload('indexes.js', function () {
|
||||
var arrayIndex = previousIndex[1];
|
||||
|
||||
var sourceArray = Indexes.getIndexArray(indexChoice);
|
||||
if (sourceArray !== null) {
|
||||
if (sourceArray === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (arrayIndex in sourceArray) {
|
||||
var sourceLength = sourceArray[arrayIndex].columns.length;
|
||||
|
||||
var targetColumns = [];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user