Skip to content

Commit be6f699

Browse files
committed
Fix walker tests
1 parent 654bc08 commit be6f699

File tree

1 file changed

+6
-2
lines changed
  • src/plugins/validation/semantic-validators/validators

1 file changed

+6
-2
lines changed

src/plugins/validation/semantic-validators/validators/walker.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export function validate({ jsSpec }) {
1515
function walk(value, path) {
1616
let curr = path[path.length - 1]
1717

18-
if(typeof value !== "object" || value === null) {
19-
return
18+
if(value === null) {
19+
return null
2020
}
2121

2222
///// "type" should always be a string, everywhere.
@@ -78,6 +78,10 @@ export function validate({ jsSpec }) {
7878
}
7979
}
8080

81+
if(typeof value !== "object") {
82+
return null
83+
}
84+
8185
let keys = Object.keys(value)
8286

8387
if(keys.length) {

0 commit comments

Comments
 (0)