Skip to content

remove duplicate classList.remove() and debug console.log statements …#266

Open
khushboo-khatoon wants to merge 1 commit into
thetechguardians:mainfrom
khushboo-khatoon:fix/analysis-remove-duplicate-classlist-and-debug-logs
Open

remove duplicate classList.remove() and debug console.log statements …#266
khushboo-khatoon wants to merge 1 commit into
thetechguardians:mainfrom
khushboo-khatoon:fix/analysis-remove-duplicate-classlist-and-debug-logs

Conversation

@khushboo-khatoon

Copy link
Copy Markdown

Description

Cleans up analysis.js in the city autocomplete suggestions section by removing a redundant DOM operation and leftover debug logging that shouldn't ship to production.

Changes

  • Removed duplicate suggestionsBox.classList.remove("hidden") call (was executed twice back-to-back)
  • Removed all debug console.log statements from the city autocomplete input listener:
    • console.log("Typing:", cityInput.value)
    • console.log("Cities:", cities)
    • console.log("After remove:", suggestionsBox.className)
    • console.log(cities)
    • console.log("Children:", suggestionsBox.children.length)
    • console.log(suggestionsBox.innerHTML)
  • Retained console.error("Autocomplete Error:", err) for legitimate error handling

Why

  • Removes a redundant DOM operation triggered on every keystroke
  • Prevents internal data (city search results, DOM state) from being exposed in the browser console
  • Reduces console clutter for other contributors
  • Improves code readability and production readiness

Scope

Changes are isolated to the city autocomplete input listener in analysis.js. No other logic, styles, or backend code were modified.

Testing

  • Verified city autocomplete suggestions still show/hide correctly on input
  • Confirmed no debug logs appear in the browser console while typing
  • Confirmed console.error still fires correctly on a simulated fetch failure

Related Issue

Closes #249

@khushboo-khatoon

Copy link
Copy Markdown
Author

hey @thetechguardians ,

PR is now ready to review and merge .
please lemme know if any changes needed.
thanks ( :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove duplicate classList.remove() call and debug console.log statements in analysis.js

1 participant