Skip to content

Commit

Permalink
don't break if schemas is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
niko.usai committed Dec 10, 2021
1 parent 1718b1a commit 3bd623c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion joyce-api/src/scripts/generate-models.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async function run() {
}

// compare computed schemas hashes, if they differ we exit with a code to let npm script do a mesh build
if (schemas_hash !== new_hash.digest("hex")) {
if (Object.keys(schemaJson["schemas"]).length == 0 || schemas_hash !== new_hash.digest("hex")) {
console.log("hash differs");
fs.writeFileSync(HASHES_FILE, JSON.stringify(hashes), "utf8");
saveMeshrc(Object.keys(schemaJson["schemas"]), mongoURI);
Expand Down

0 comments on commit 3bd623c

Please sign in to comment.