Parcourir la source

修复单元格渲染报错

xjj il y a 2 ans
Parent
commit
c40d1b5625
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      src/controllers/menuButton.js
  2. 1 1
      src/global/border.js

+ 1 - 1
src/controllers/menuButton.js

@@ -3836,7 +3836,7 @@ const menuButton = {
             row_index = margeMaindata.r;
 
 
-            if(d[row_index][col_index]==null){
+            if(row_index === undefined || col_index === undefined || d[row_index][col_index]==null){
                 console.warn("Main merge Cell info is null", row_index, col_index);
                 return null;
             }

+ 1 - 1
src/global/border.js

@@ -1031,7 +1031,7 @@ function getBorderInfoComputeRange(dataset_row_st,dataset_row_ed,dataset_col_st,
                                     let cell_top = data[bd_r_top][bd_c];
 
                                     let mc_t = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c];
-
+                                    if(!mc_t) break;
                                     if(mc_t.r + mc_t.rs - 1 == bd_r_top){
                                         borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style };
                                     }