Skip to content

Commit

Permalink
Working on issue #1091. Fixed issue caught in PR #1085 with file test…
Browse files Browse the repository at this point in the history
…-files/semantic-error-test-files/empty-network-xlsx-with-network-tab.xlsx. Added a try-catch that makes error modal pop up
  • Loading branch information
ceciliazaragoza committed Feb 3, 2024
1 parent d9c56c2 commit 5903498
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/controllers/network-sheet-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ var parseNetworkSheet = function (sheet, network) {
var rowData = [];

// check for “cols regulators/rows targets” in cell A1
const cellA1 = sheet.data[0][0];
let cellA1 = "";
try {
cellA1 = sheet.data[0][0];
} catch (err) {
addError(network, constants.errors.missingValueError(row, column));
return network;
}

// TODO There are now 2 valid values for cellA1. One indicates GRN, the other is PPI.
// If neither, then we continue with the warning.
Expand Down

0 comments on commit 5903498

Please sign in to comment.