Skip to content

Commit

Permalink
Merge pull request #91 from FriendsOfREDAXO/schuer-types
Browse files Browse the repository at this point in the history
add types and improve check
  • Loading branch information
schuer authored Sep 22, 2024
2 parents 76e602a + 646314e commit a7aed55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/generate-image-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const imagesDirectory = 'images';
/**
* Prepare image configuration
*/
const imageConfiguration = parse(Deno.readTextFileSync(`${sourceDirectory}/images.yml`));
const imageConfiguration = parse(Deno.readTextFileSync(`${sourceDirectory}/images.yml`)) as { images: [] };

if (!(imageConfiguration !== null && typeof imageConfiguration === "object")) {
if (imageConfiguration === null && typeof imageConfiguration !== "object") {
console.error("Invalid image configuration!");
Deno.exit(1);
}
Expand Down

0 comments on commit a7aed55

Please sign in to comment.