mirror of
https://github.com/penpot/penpot.git
synced 2026-05-27 02:43:42 +00:00
🐛 Fix incorrect pred composition on number schema types
Fixes the following:
=> (sm/validate (sm/schema [::sm/int {:max 10}]) nil)
Cannot invoke "Object.getClass()" because "x" is null
This commit is contained in:
parent
ba3f84fd6c
commit
75011ca0ff
@ -694,8 +694,8 @@
|
|||||||
pred)
|
pred)
|
||||||
pred (if (some? max)
|
pred (if (some? max)
|
||||||
(fn [v]
|
(fn [v]
|
||||||
(and (>= max v)
|
(and (pred v)
|
||||||
(pred v)))
|
(>= max v)))
|
||||||
pred)]
|
pred)]
|
||||||
|
|
||||||
{:pred pred
|
{:pred pred
|
||||||
@ -732,8 +732,8 @@
|
|||||||
pred)
|
pred)
|
||||||
pred (if (some? max)
|
pred (if (some? max)
|
||||||
(fn [v]
|
(fn [v]
|
||||||
(and (>= max v)
|
(and (pred v)
|
||||||
(pred v)))
|
(>= max v)))
|
||||||
pred)]
|
pred)]
|
||||||
|
|
||||||
{:pred pred
|
{:pred pred
|
||||||
@ -762,8 +762,8 @@
|
|||||||
pred)
|
pred)
|
||||||
pred (if (some? max)
|
pred (if (some? max)
|
||||||
(fn [v]
|
(fn [v]
|
||||||
(and (>= max v)
|
(and (pred v)
|
||||||
(pred v)))
|
(>= max v)))
|
||||||
pred)
|
pred)
|
||||||
|
|
||||||
gen (sg/one-of
|
gen (sg/one-of
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user