Skip to content

Commit

Permalink
[SE] [pivot] fix bug 71985
Browse files Browse the repository at this point in the history
  • Loading branch information
SanDiegoss committed Dec 13, 2024
1 parent 251a221 commit c24b653
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cell/model/PivotTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -9185,9 +9185,11 @@ CT_pivotTableDefinition.prototype.checkInvalidNewFieldName = function(name) {
namesMap.set(this.getPivotFieldName(i).toLowerCase(), 1);
}
const dataFields = this.asc_getDataFields();
for(let i = 0; i < dataFields.length; i += 1) {
const dataField = dataFields[i];
namesMap.set(dataField.asc_getName().toLowerCase(), 1);
if (dataFields) {
for(let i = 0; i < dataFields.length; i += 1) {
const dataField = dataFields[i];
namesMap.set(dataField.asc_getName().toLowerCase(), 1);
}
}
const dataCaption = (this.dataCaption || AscCommon.translateManager.getValue(AscCommonExcel.DATA_CAPTION)).toLowerCase();
namesMap.set(dataCaption, 1);
Expand Down

0 comments on commit c24b653

Please sign in to comment.