Skip to content

Commit 25ca31d

Browse files
committed
fix sum node-type.. when previewing dont change value on the node itseld
1 parent 667caee commit 25ca31d

File tree

1 file changed

+2
-2
lines changed
  • libs/web-flow-executor/src/nodes

1 file changed

+2
-2
lines changed

libs/web-flow-executor/src/nodes/sum.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const getSum: NodeTaskFactory<NodeInfo> = (
7474
const sum = values
7575
.map((value) => parseFloat(value) ?? 0)
7676
.reduce((a, b) => a + b, 0);
77-
if (htmlNode) {
77+
if (htmlNode && !payload?.showPreview) {
7878
if (hasInitialValue) {
7979
hasInitialValue = false;
8080
}
@@ -83,8 +83,8 @@ export const getSum: NodeTaskFactory<NodeInfo> = (
8383
if (rect) {
8484
rect.resize(240);
8585
}
86+
currentSum = sum;
8687
}
87-
currentSum = sum;
8888

8989
if (payload?.showPreview) {
9090
showPreviewTip(sum, previewNode);

0 commit comments

Comments
 (0)