This commit is contained in:
naskya 2023-06-01 08:01:24 +09:00
parent 151f5e355d
commit 7b02b87ec6
No known key found for this signature in database
GPG key ID: 164DFF24E2D40139

View file

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