Skip to content

Commit

Permalink
check if citationJson has member "citations"
Browse files Browse the repository at this point in the history
  • Loading branch information
a1henu committed May 1, 2024
1 parent e528a68 commit a100ec3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ std::unordered_map<std::string, CitationPtr> loadCitations(const std::string& fi
std::exit(1);
}

if (!citationJson.contains("citations")) {
std::exit(1);
}
nlohmann::json data = citationJson["citations"];
std::unordered_map<std::string, CitationPtr> citations;

Expand Down

0 comments on commit a100ec3

Please sign in to comment.