Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
add check for existence of res.swagger in queryResource
Browse files Browse the repository at this point in the history
  • Loading branch information
winniehell committed Mar 12, 2016
1 parent e533350 commit 6f6b591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mock/query-resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function getDefaultValue(res) {
if (res.body) {
return res.body;
}
else if (res.swagger.schema) {
else if (res.swagger && res.swagger.schema) {
return res.swagger.schema.default || res.swagger.schema.example;
}
}

0 comments on commit 6f6b591

Please sign in to comment.