File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
libs/web-flow-executor/src/nodes Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export const getSum: NodeTaskFactory<NodeInfo> = (
4040 values = [ input ] ;
4141 }
4242 const sum = values
43- . map ( ( value ) => parseInt ( value ) ?? 0 )
43+ . map ( ( value ) => parseFloat ( value ) ?? 0 )
4444 . reduce ( ( a , b ) => a + b , 0 ) ;
4545 if ( htmlNode ) {
4646 createElement (
@@ -56,15 +56,15 @@ export const getSum: NodeTaskFactory<NodeInfo> = (
5656 if ( hasInitialValue ) {
5757 hasInitialValue = false ;
5858 }
59- htmlNode . domElement . textContent = `Sum: ${ sum . toString ( ) } ` ;
59+ htmlNode . domElement . textContent = `Sum: ${ sum . toFixed ( 2 ) } ` ;
6060
6161 if ( rect ) {
6262 rect . resize ( 240 ) ;
6363 }
6464 }
6565 currentSum = sum ;
6666 return {
67- result : sum . toString ( ) ,
67+ result : sum . toFixed ( 2 ) ,
6868 followPath : undefined ,
6969 previousOutput : ( previousOutput ?? '' ) . toString ( ) ,
7070 } ;
You can’t perform that action at this time.
0 commit comments