Skip to content

Commit

Permalink
rename variable in html2 (#20443)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 authored Jan 11, 2025
1 parent eb47b9d commit 522b134
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions samples/documentation/html2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 522b134

Please sign in to comment.