pl-api: fix regression with version parsing

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-10-19 01:06:53 +02:00
parent 5537563644
commit 5befd8e9db
4 changed files with 7 additions and 7 deletions

View File

@ -31,7 +31,7 @@ const mimeSchema = v.pipe(v.string(), v.regex(/^\w+\/[-+.\w]+$/));
const coerceObject = <T extends v.ObjectEntries>(shape: T) =>
v.pipe(
v.any(),
v.transform((input) => typeof input === 'object' ? input : {}),
v.transform((input) => typeof input === 'object' && input !== null ? input : {}),
v.object(shape),
);

View File

@ -1,6 +1,6 @@
{
"name": "pl-api",
"version": "0.1.1",
"version": "0.1.2",
"type": "module",
"homepage": "https://github.com/mkljczk/pl-fe/tree/fork/packages/pl-api",
"repository": {