From d97105e970bc7de1cd5eb73126f139e759ce5372 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 6 Mar 2024 23:04:37 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/10519 --- app/src/protyle/render/av/filter.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/src/protyle/render/av/filter.ts b/app/src/protyle/render/av/filter.ts index b3d9e4077..5a1ecb2bf 100644 --- a/app/src/protyle/render/av/filter.ts +++ b/app/src/protyle/render/av/filter.ts @@ -204,11 +204,15 @@ export const setFilter = async (options: { }); options.data.view.filters.find(item => { if (item.column === colData.id && item.value.type === "rollup") { - item.value.rollup.contents = [{ - [filterType]: genCellValue(filterType, ""), - type: filterType - }]; - item.operator = getDefaultOperatorByType(filterType) + if (!item.value.rollup) { + item.value.rollup = { + contents: [{ + [filterType]: genCellValue(filterType, ""), + type: filterType + }] + }; + item.operator = getDefaultOperatorByType(filterType) + } return true; } });