Title: Javascript Error on Scroll
Last modified: May 4, 2023

---

# Javascript Error on Scroll

 *  [Tony Hayes](https://wordpress.org/support/users/majick/)
 * (@majick)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/javascript-error-on-scroll/)
 * I got this javascript error in my browser console as soon as I scroll the screen(
   and repeats whenever I scroll the screen):
   _ Uncaught TypeError: Cannot set properties
   of undefined (setting ‘clean’)_
 * To find the line I loaded the unminified javascript and this seems to happen 
   on line 317 (or 379) which is:
   `initialEls[index].clean = true;}` so I changed
   this to:`if (initialEls.index) {initialEls[index].clean = true;}` so that it 
   fails silently.As I’m not sure under what condition the index doesn’t exist in
   the first place, so I thought I’d report it here to be fixed.
    -  This topic was modified 3 years, 1 month ago by [Tony Hayes](https://wordpress.org/support/users/majick/).

The topic ‘Javascript Error on Scroll’ is closed to new replies.

 * ![](https://ps.w.org/top-bar/assets/icon-256x256.png?rev=1126189)
 * [Top Bar](https://wordpress.org/plugins/top-bar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/top-bar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/top-bar/)
 * [Active Topics](https://wordpress.org/support/plugin/top-bar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/top-bar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/top-bar/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Tony Hayes](https://wordpress.org/support/users/majick/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/javascript-error-on-scroll/)
 * Status: not resolved