diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache index 4a0e8baf409..568c7e31ee0 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache @@ -111,10 +111,10 @@ } else { // Use a for loop instead of forEach to avoid nested functions // Otherwise "return" will not work properly - for(var prompt in currentNode){ - if (currentNode.hasOwnProperty(prompt)) { - currentChild = currentNode[prompt] - if (id == prompt) { + for(var property in currentNode){ + if (currentNode.hasOwnProperty(property)) { + currentChild = currentNode[property] + if (id == property) { return currentChild; } else { // Search in the current child diff --git a/samples/documentation/html2/index.html b/samples/documentation/html2/index.html index 5846a550fc3..defce7cd6ce 100644 --- a/samples/documentation/html2/index.html +++ b/samples/documentation/html2/index.html @@ -163,10 +163,10 @@ h={};g()}};typeof define==="function"&&define.amd&&define("google-code-prettify" } else { // Use a for loop instead of forEach to avoid nested functions // Otherwise "return" will not work properly - for(var prompt in currentNode){ - if (currentNode.hasOwnProperty(prompt)) { - currentChild = currentNode[prompt] - if (id == prompt) { + for(var property in currentNode){ + if (currentNode.hasOwnProperty(property)) { + currentChild = currentNode[property] + if (id == property) { return currentChild; } else { // Search in the current child