Skip to content

Commit 3bb9abf

Browse files
marbemacP0lip
andauthored
fix: don’t kill entire JSV for one null value (#66)
* fix: don’t kill entire JSV for one null value * Update src/utils/renderSchema.ts Co-Authored-By: Jakub Rożek <jakub@stoplight.io> * chore: remove unused property Co-authored-by: Jakub Rożek <jakub@rozek.tech>
1 parent de7a986 commit 3bb9abf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/utils/renderSchema.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ const getPatternProperties: Walker = function*(schema, level = 0, meta) {
4747

4848
export const renderSchema: Walker = function*(schema, level = 0, meta = { path: [] }, options = {}) {
4949
if (typeof schema !== 'object' || schema === null) {
50-
throw new TypeError(
51-
`Expected schema to be an "object" but received ${schema === null ? '"null"' : `a "${typeof schema}"`}`,
52-
);
50+
return;
5351
}
5452

5553
if (options.depth !== undefined && level >= options.depth) return;

0 commit comments

Comments
 (0)