Skip to content

Commit

Permalink
Merge pull request #27 from avantifellows/api-clg
Browse files Browse the repository at this point in the history
null check
  • Loading branch information
pranshugupta54 authored Aug 10, 2024
2 parents 66065f1 + 7c5f60f commit 25f2891
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pages/college_predictor.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const CollegePredictor = () => {
try {
const params = new URLSearchParams(Object.entries(query));
const queryString = params.toString();
if (queryString === "") return
const response = await fetch(`/api/exam-result?${queryString}`);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
Expand Down

0 comments on commit 25f2891

Please sign in to comment.