瀏覽代碼

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

Daniel 1 年之前
父節點
當前提交
ca1be10f17
共有 1 個文件被更改,包括 4 次插入0 次删除
  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)