Skip to content

Commit 7e3e6a0

Browse files
author
Jordan Upiter
committed
Fixed issue when a validate attribute is undefined, o.describe throws
1 parent 9220899 commit 7e3e6a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@ function describeRoute(route) {
179179
*/
180180

181181
function describeObject(o) {
182+
if (!isObject(o)) return o;
183+
182184
if (typeof o.describe === 'function') return o.describe();
183185

184186
var ret = {};
185-
if (!isObject(o)) return o;
186187

187188
Object.keys(o).forEach(function(key) {
188189
ret[key] = describeObject(o[key]);

0 commit comments

Comments
 (0)