{"id":16709936,"date":"2023-05-04T09:43:55","date_gmt":"2023-05-04T09:43:55","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/javascript-error-on-scroll\/"},"modified":"2023-05-04T09:45:12","modified_gmt":"2023-05-04T09:45:12","slug":"javascript-error-on-scroll","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/javascript-error-on-scroll\/","title":{"rendered":"Javascript Error on Scroll"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I got this javascript error in my browser console as soon as I scroll the screen (and repeats whenever I scroll the screen):<br \/><em> Uncaught TypeError: Cannot set properties of undefined (setting &#8216;clean&#8217;)<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To find the line I loaded the unminified javascript and this seems to happen on line 317 (or 379) which is:<br \/><code>initialEls[index].clean = true;}<\/code> <br \/>so I changed this to:<br \/><code>if (initialEls.index) {initialEls[index].clean = true;}<\/code> <br \/>so that it fails silently.<br \/><br \/>As I&#8217;m not sure under what condition the index doesn&#8217;t exist in the first place, so I thought I&#8217;d report it here to be fixed.<\/p>\n","protected":false},"template":"","class_list":["post-16709936","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16709936","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16709936\/revisions"}],"predecessor-version":[{"id":16709939,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16709936\/revisions\/16709939"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16709936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}