Use zod fatal support.
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@
|
||||
"lit": "^2.0.2",
|
||||
"quick-lru": "github:sindresorhus/quick-lru",
|
||||
"screenfull": "^5.1.0",
|
||||
"zod": "^3.10.0"
|
||||
"zod": "^3.11.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.15.8",
|
||||
|
||||
@@ -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