fix crash in face library on initial start after enabling

This commit is contained in:
Josh Hawkins 2025-05-10 22:44:12 -05:00
parent fc2f9aa65c
commit fda420a0b3
2 changed files with 3 additions and 2 deletions

View File

@ -68,6 +68,7 @@
"dropInstructions": "Drag and drop an image here, or click to select",
"maxSize": "Max size: {{size}}MB"
},
"nofaces": "No faces available",
"readTheDocs": "Read the documentation",
"trainFaceAs": "Train Face as:",
"trainFace": "Train Face",

View File

@ -390,10 +390,10 @@ export default function FaceLibrary() {
</div>
)}
</div>
{pageToggle && faceImages.length === 0 && pageToggle !== "train" ? (
{pageToggle && faceImages?.length === 0 && pageToggle !== "train" ? (
<div className="absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center text-center">
<LuFolderCheck className="size-16" />
No faces available
{t("nofaces")}
</div>
) : (
pageToggle &&