From e863e74e226c8ed8ffe7111b93420467791c0329 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Wed, 3 Jan 2024 20:20:56 +0100 Subject: [PATCH] fix: some shit --- lib/cache/cache.ts | 1 - lib/resource/recipes.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/cache/cache.ts b/lib/cache/cache.ts index 6bffdf5..acc6420 100644 --- a/lib/cache/cache.ts +++ b/lib/cache/cache.ts @@ -6,7 +6,6 @@ import { RedisValue, } from "https://deno.land/x/redis@v0.31.0/mod.ts"; import { createLogger } from "@lib/log.ts"; -import { getTimeCacheKey } from "@lib/string.ts"; const REDIS_HOST = Deno.env.get("REDIS_HOST"); const REDIS_PASS = Deno.env.get("REDIS_PASS") || ""; diff --git a/lib/resource/recipes.ts b/lib/resource/recipes.ts index 1e18402..43cb378 100644 --- a/lib/resource/recipes.ts +++ b/lib/resource/recipes.ts @@ -110,7 +110,7 @@ function parseIngredients(children: DocumentChild[]): Recipe["ingredients"] { if (child.type === "paragraph") { const nextChild = children[i + 1]; - if (nextChild.type !== "list") continue; + if (!nextChild || nextChild.type !== "list") continue; ingredients.push({ name: getTextOfChild(child) || "",