Skip to content

Commit c644ab1

Browse files
author
Miroslav Bajtoš
committed
Merge remote-tracking branch 'upstream/master'
swagger-api/swagger-js@dd8f847c8e
2 parents 2077a61 + dd8f847 commit c644ab1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/schema-markup.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ function schemaToHTML(name, schema, models, modelPropertyMacro) {
211211
if(typeof schema.$ref === 'string') {
212212
name = Helpers.simpleRef(schema.$ref);
213213
schema = models[name];
214+
if(typeof schema === 'undefined')
215+
{
216+
return strongOpen + name + ' is not defined!' + strongClose;
217+
}
214218
}
215219

216220
if(typeof name !== 'string') {

0 commit comments

Comments
 (0)