Skip to content

Conversation

PromInc
Copy link
Contributor

@PromInc PromInc commented Jun 30, 2025

Summary

Prevent JS Error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'nodeValue')

Result

image

Steps to Recreate

  1. Navigate to an instant search results page
  2. Perform a search that will return no results
    • BUG: observe the error was thrown in the dev tools console panel

@denis-g
Copy link

denis-g commented Aug 13, 2025

I have the same error. What do you change in minify JS?

@PromInc
Copy link
Contributor Author

PromInc commented Aug 14, 2025

@denis-g good question.

Change this:

this.nodes[0].nodeValue&&(this.nodes[0].nodeValue="")

To this:

this.nodes && this.nodes.length > 0 && this.nodes[0].nodeValue&&(this.nodes[0].nodeValue="")

(it's on line 2 🤣)

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.

2 participants