From 1818004ec457b229554b64243141ec740d985acf Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 11 Jan 2025 15:47:30 +0800 Subject: [PATCH] rename variable in html2 --- .../src/main/resources/htmlDocs2/index.mustache | 8 ++++---- samples/documentation/html2/index.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache index 4a0e8baf4092..568c7e31ee05 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 5846a550fc3e..defce7cd6ce2 100644 --- a/samples/documentation/html2/index.html +++ b/samples/documentation/html2/index.html @@ -163,10 +163,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