Use zod fatal support.
This commit is contained in:
@@ -368,6 +368,8 @@ export class FrigateCard extends LitElement {
|
||||
return [];
|
||||
}
|
||||
contenders.push(this._getParseErrorPathString(issue.path));
|
||||
} else if (issue.code != 'custom') {
|
||||
contenders.push(this._getParseErrorPathString(issue.path));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -213,9 +213,9 @@ const customSchema = z
|
||||
type: z.string().superRefine((val, ctx) => {
|
||||
if (!val.match(/^custom:(?!frigate-card).+/)) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.invalid_type,
|
||||
expected: 'string',
|
||||
received: 'string',
|
||||
code: z.ZodIssueCode.custom,
|
||||
message: "Frigate-card custom elements must match specific schemas",
|
||||
fatal: true,
|
||||
});
|
||||
}
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user