Skip to content

Commit d4c8f4b

Browse files
authored
Merge pull request #358 from sneakyvv/protect-addSchemaInfoToExample
Add condition to protect addSchemaInfoToExample
2 parents c877fae + 1d07e33 commit d4c8f4b

File tree

8 files changed

+10
-60
lines changed

8 files changed

+10
-60
lines changed

dist/index.html.gz

0 Bytes
Binary file not shown.

dist/rapidoc-min.js

Lines changed: 3 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rapidoc-min.js.gz

-112 Bytes
Binary file not shown.

dist/rapidoc-min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rapidoc-min.js.map.gz

-5 Bytes
Binary file not shown.

dist/report.html

Lines changed: 0 additions & 43 deletions
This file was deleted.

docs/rapidoc-min.js

Lines changed: 3 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/schema-utils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ export function json2xml(obj, level = 1) {
201201
}
202202

203203
function addSchemaInfoToExample(schema, obj) {
204+
if (typeof obj !== 'object') {
205+
return;
206+
}
204207
if (schema.title) {
205208
obj['::TITLE'] = schema.title;
206209
}

0 commit comments

Comments
 (0)