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 🤣)

@cammonro
Copy link
Contributor

@PromInc Thank you for your contribution - and your patience as we try to catch up on things!

The InstantSearch libs are actually managed separately from our Magento extension.

However, this issue should be fixed already in version 3.16.0 of this extension on 13ed96d.

This fix is also being backported for 3.15.2.

If you still are having issues with these JavaScript libraries, please feel free to share further details in the aforementioned repo or open a ticket with support.

@cammonro cammonro closed this Sep 17, 2025
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.

3 participants