Skip to content

Commit a3edf1f

Browse files
committed
cleanup
null collapse operator
1 parent e219f23 commit a3edf1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/lib/JSONSchemaMarkdown.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class JSONSchemaMarkdown {
254254
* @param {String} path String describing the path of the property
255255
*/
256256
typeObject(name, data, level, path) {
257-
const required = (this.empty(data.required)) ? [] : data.required;
257+
const required = data.required ?? [];
258258
if (this.empty(data.properties)) {
259259
throw "`object` missing properties at " + path;
260260
}
@@ -287,7 +287,7 @@ class JSONSchemaMarkdown {
287287
* @param {String} path String describing the path of the property
288288
*/
289289
typeUnknown(name, data, level, path) {
290-
console.log('unknown prop type "', data.type, '" at ' + path, data);
290+
console.error('unknown prop type "', data.type, '" at ' + path, data);
291291
}
292292

293293
/**

0 commit comments

Comments
 (0)