@@ -162,11 +162,10 @@ function handleProperties(schema, properties, node, stack) {
162162 continue
163163 }
164164
165- if ( value && typeof value === 'object' && 'length' in value ) {
166- value = handlePropertyValues ( schema , value , prop , definition )
167- } else {
168- value = handlePropertyValue ( schema , value , prop , definition )
169- }
165+ value =
166+ value && typeof value === 'object' && 'length' in value
167+ ? handlePropertyValues ( schema , value , prop , definition )
168+ : handlePropertyValue ( schema , value , prop , definition )
170169
171170 if ( value !== null && value !== undefined ) {
172171 result [ prop ] = value
@@ -216,7 +215,7 @@ function handlePropertyValue(schema, value, prop, definition) {
216215 return null
217216 }
218217
219- if ( definition . length !== 0 && definition . indexOf ( value ) === - 1 ) {
218+ if ( definition . length > 0 && definition . indexOf ( value ) === - 1 ) {
220219 return null
221220 }
222221
@@ -304,7 +303,7 @@ function handleTagName(schema, tagName, node, stack) {
304303
305304 // Some nodes can break out of their context if they don’t have a certain
306305 // ancestor.
307- if ( ancestors . length !== 0 ) {
306+ if ( ancestors . length > 0 ) {
308307 length = ancestors . length + 1
309308 index = - 1
310309
0 commit comments