Browse Source

:art: 数据库

Vanessa 1 year ago
parent
commit
36c4a3891b
2 changed files with 4 additions and 1 deletions
  1. 1 0
      app/src/protyle/render/av/calc.ts
  2. 3 1
      app/src/protyle/render/av/rollup.ts

+ 1 - 0
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":

+ 3 - 1
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;
                     }
                 });