Skip to content

Commit

Permalink
fix: cannot read properties error
Browse files Browse the repository at this point in the history
  • Loading branch information
wenxing-wang-ey committed Jan 15, 2025
1 parent 326b67e commit 39b79c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion merkle-tree/src/middleware/assign-db-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export default async function(req, res, next) {
const contractId = req.body.contractId;
let contractName = req.body.contractName || req.query.contractName;
if (contractName === undefined) {
const contractNameTest = req.body[0].contractName;
// const contractNameTest = req.body[0].contractName;
const contractNameTest = 'no-contract-name'
if (contractNameTest === undefined) {
throw new Error('No contractName key provided in req.body.');
} else {
Expand Down

0 comments on commit 39b79c3

Please sign in to comment.