Merge branch 'develop' of https://codeberg.org/calckey/calckey into upstream/develop

This commit is contained in:
Freeplay 2023-05-31 22:10:49 -04:00
commit b0390a3fc0

View file

@ -173,7 +173,11 @@ function validate(profile: unknown): void {
if (!isObject(profile)) throw new Error("not an object"); if (!isObject(profile)) throw new Error("not an object");
// Check if unnecessary properties exist // Check if unnecessary properties exist
if (Object.keys(profile).some((key) => !profileProps.includes(key))) if (
Object.keys(profile).some(
(key) => !profileProps.includes(key) && key !== "host"
)
)
throw new Error("Unnecessary properties exist"); throw new Error("Unnecessary properties exist");
if (!profile.name) throw new Error("Missing required prop: name"); if (!profile.name) throw new Error("Missing required prop: name");