Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix: fix getValidatorStatusAsync api result (#5963)
wpxp1234569ea416e368ec
diff --git a/packages/sheets-data-validation/src/services/dv-validator-service.ts b/packages/sheets-data-validation/src/services/dv-validator-service.tsindex 4e2a13a8ef..6a95d3bd52 100644--- a/packages/sheets-data-validation/src/services/dv-validator-service.ts+++ b/packages/sheets-data-validation/src/services/dv-validator-service.ts@@ -146,15 +146,19 @@ export class SheetsDataValidationValidatorService extends Disposable {throw new Error(`cannot find current worksheet, sheetId: ${subUnitId}`);}const rules = this._sheetDataValidationModel.getRules(unitId, subUnitId);- await Promise.all(rules.map((rule) => {- return Promise.all(rule.ranges.map((range) => {- const promises: Promise<DataValidationStatus>[] = [];- Range.foreach(range, (row, col) => {- promises.push(this._validatorByCell(workbook, worksheet, row, col));- });- return promises;- }));- }));+ await Promise.all(+ rules.map((rule) => {+ return Promise.all(+ rule.ranges.map((range) => {+ const promises: Promise<DataValidationStatus>[] = [];+ Range.foreach(range, (row, col) => {+ promises.push(this._validatorByCell(workbook, worksheet, row, col));+ });+ return Promise.all(promises);+ })+ );+ })+ );return this._dataValidationCacheService.ensureCache(unitId, subUnitId);}