fix: ignore prototype's keys in a handful of for...in loops

This commit is contained in:
narutowyh
2018-01-05 21:57:17 -06:00
committed by kyle
parent bd41b736a8
commit 12a9fbc0ca
3 changed files with 9 additions and 0 deletions
+3
View File
@@ -181,6 +181,9 @@ export const sampleXmlFromSchema = (schema, config={}) => {
example = example || {}
for (let propName in props) {
if (!props.hasOwnProperty(propName)) {
continue
}
if ( props[propName].readOnly && !includeReadOnly ) {
continue
}