1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-25 22:44:19 +00:00

🐛 Fix error in BoxWithHeader

This commit is contained in:
Stefano Pigozzi 2021-04-21 02:55:57 +02:00
parent 989688ce5b
commit 4f9a7bc272
Signed by untrusted user who does not match committer: steffo
GPG key ID: 6965406171929D01

View file

@ -18,7 +18,16 @@ export default function BoxWithHeader({ header, body, children, className, ...pr
} }
} }
if(header === undefined) {
header = {}
}
if(body === undefined) {
body = {}
}
if(children) { if(children) {
if(body.children) { if(body.children) {
throw new Error("If directly passing `children` to BoxWithHeader, body.children should not be set.") throw new Error("If directly passing `children` to BoxWithHeader, body.children should not be set.")
} }