Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 数据库

Vanessa36c4a3891b3e
diff --git a/app/src/protyle/render/av/calc.ts b/app/src/protyle/render/av/calc.ts
index 6a14539960..82e92b1b3c 100644
--- a/app/src/protyle/render/av/calc.ts
+++ b/app/src/protyle/render/av/calc.ts
@@ -399,6 +399,7 @@ export const getCalcValue = (column: IAVColumn) => {
export const getNameByOperator = (operator: string, isRollup: boolean) => {
switch (operator) {
+ case undefined:
case "":
return isRollup ? window.siyuan.languages.original : window.siyuan.languages.calcOperatorNone;
case "Count all":
diff --git a/app/src/protyle/render/av/rollup.ts b/app/src/protyle/render/av/rollup.ts
index 7cc10f97cc..4c38c8ea37 100644
--- a/app/src/protyle/render/av/rollup.ts
+++ b/app/src/protyle/render/av/rollup.ts
@@ -200,7 +200,9 @@ export const bindRollupData = (options: {
goSearchRollupTargetElement.querySelector(".b3-menu__accelerator").textContent = item.key.name;
const goSearchRollupCalcElement = options.menuElement.querySelector('[data-type="goSearchRollupCalc"]') as HTMLElement;
goSearchRollupCalcElement.dataset.colType = item.key.type;
- goSearchRollupCalcElement.dataset.calc = oldValue.calc.operator;
+ if (oldValue.calc) {
+ goSearchRollupCalcElement.dataset.calc = oldValue.calc.operator;
+ }
return true;
}
});