Skip to content

Commit 4785dfc

Browse files
committed
Workaround to resume calc service when table creation fails github:18312
Case ID: CAS-59946-R8S4C1 : SJS-32502
1 parent b1b5f0c commit 4785dfc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Resources/scripts/commands/tables.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,13 @@
253253
if (i.rowCount < minHeight) {
254254
i.rowCount = minHeight;
255255
}
256-
257-
const table = i.sheet.tables.add(params.name, i.row, i.column, i.rowCount, i.columnCount, tableTheme, options);
256+
var table = null;
257+
try {
258+
table = i.sheet.tables.add(params.name, i.row, i.column, i.rowCount, i.columnCount, tableTheme, options);
259+
} catch (e) {
260+
Utils.spread.resumeCalcService(true); // Case ID: CAS-59946-R8S4C1 (SJS-32502): resume not called if error occurs
261+
throw e;
262+
}
258263
const tryToGetAutoCreatedColumn = Utils._tryToGetAutoCreatedColumn;
259264
if (table != null) {
260265
if (columns.length > 0) {

0 commit comments

Comments
 (0)