Browse Source

:bug: Database rollup calculation range anomaly https://github.com/siyuan-note/siyuan/issues/10913

Daniel 1 year ago
parent
commit
ca1be10f17
1 changed files with 4 additions and 0 deletions
  1. 4 0
      kernel/av/value.go

+ 4 - 0
kernel/av/value.go

@@ -781,6 +781,10 @@ func (r *ValueRollup) RenderContents(calc *RollupCalc, destKey *Key) {
 			r.Contents = []*Value{{Type: KeyTypeNumber, Number: NewFormattedValueNumber(maxVal, destKey.NumberFormat)}}
 		}
 	case CalcOperatorRange:
+		if 2 > len(r.Contents) {
+			return
+		}
+
 		minVal := math.MaxFloat64
 		maxVal := -math.MaxFloat64
 		earliest := int64(0)