Skip to content

Commit 89848ea

Browse files
committed
chore: check that its not empty too just in case
1 parent a8942cd commit 89848ea

File tree

1 file changed

+2
-2
lines changed
  • web/src/pages/Cases/CaseDetails/Voting/Shutter

1 file changed

+2
-2
lines changed

web/src/pages/Cases/CaseDetails/Voting/Shutter/Commit.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ const Commit: React.FC<ICommit> = ({
8585

8686
const handleCommit = useCallback(
8787
async (choice: bigint) => {
88-
if (!import.meta.env.REACT_APP_SHUTTER_API) {
89-
console.error("REACT_APP_SHUTTER_API environment variable is not set");
88+
if (!import.meta.env.REACT_APP_SHUTTER_API || import.meta.env.REACT_APP_SHUTTER_API.trim() === "") {
89+
console.error("REACT_APP_SHUTTER_API environment variable is not set or is empty");
9090
throw new Error("Cannot commit vote: REACT_APP_SHUTTER_API environment variable is required but not set");
9191
}
9292
const message = { message: saltKey };

0 commit comments

Comments
 (0)