handle error from invalid input

This commit is contained in:
Phillip Thelen
2024-06-10 11:23:46 +02:00
parent 3313584d60
commit c2b370f4d3
2 changed files with 11 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ function getItemByPath (path, setType) {
if (setType === 'hair') {
// itemPathParent is in this format: hair.purple
const hairType = itemPathParent.split('.')[1];
if (!content.appearances.hair[hairType]) return null;
return content.appearances.hair[hairType][itemKey];
}