File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed
packages/sheets-formula/src/services/remote Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -50,16 +50,21 @@ export class RemoteFormulaDependencyGeneratorService implements IRemoteFormulaDe
5050 configService . setForceCalculate ( true ) ;
5151 const trees = await this . _dependencyGenerator . generate ( ) ;
5252 configService . setForceCalculate ( originalForceCalculate ) ;
53- return trees
54- . filter ( ( tree ) => ( isFormulaString ( tree . formula ) || isFormulaId ( tree . formulaId ) ) || tree . featureId != null )
55- . map ( ( tree ) => ( {
56- unitId : tree . unitId ,
57- subUnitId : tree . subUnitId ,
58- row : tree . row ,
59- column : tree . column ,
60- featureId : tree . featureId || undefined ,
61- formula : tree . formula || undefined ,
62- formulaId : tree . formulaId || undefined ,
63- } ) ) ;
53+ const result : Array < IFormulaCellAndFeatureItem > = [ ] ;
54+ for ( let i = 0 ; i < trees . length ; i ++ ) {
55+ const tree = trees [ i ] ;
56+ if ( ( isFormulaString ( tree . formula ) || isFormulaId ( tree . formulaId ) ) || tree . featureId != null ) {
57+ result . push ( {
58+ unitId : tree . unitId ,
59+ subUnitId : tree . subUnitId ,
60+ row : tree . row ,
61+ column : tree . column ,
62+ featureId : tree . featureId || undefined ,
63+ formula : tree . formula || undefined ,
64+ formulaId : tree . formulaId || undefined ,
65+ } ) ;
66+ }
67+ }
68+ return result ;
6469 }
6570}
You can’t perform that action at this time.
0 commit comments