fix: undefiend numeric parameters

This commit is contained in:
Arthur 2023-02-07 14:51:26 +08:00 committed by Qaplagzy
parent 7c6a7f2af1
commit 3c09b8ea6a

View File

@ -177,6 +177,14 @@ class Parser extends Emitter {
*/
_callCellValue(label) {
const [row, column, sheetName] = extractLabel(label);
if (row?.index === -1) {
throw Error(ERROR_NAME);
} else if (column?.index === -1) {
if (row.isAbsolute || column.isAbsolute) {
throw Error(ERROR_NAME);
}
return row.index + 1;
}
let value = void 0;
this.emit('callCellValue', {label, row, column, sheetName}, this.options, (_value) => {