# Javascript error on warcraftlogs.com

**URL:** <https://forums.combatlogforums.com/t/javascript-error-on-warcraftlogs-com/3054>\
**Category:** Warcraft Logs\
**Created:** [March 31, 2017, 5:20pm UTC](https://forums.combatlogforums.com/t/javascript-error-on-warcraftlogs-com/3054 "2017-03-31T17:20:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![GraysonCarlyle](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@GraysonCarlyle](https://forums.combatlogforums.com/u/GraysonCarlyle)\
**Post date:** [March 31, 2017, 5:20pm UTC](https://forums.combatlogforums.com/t/javascript-error-on-warcraftlogs-com/3054/1 "2017-03-31T17:20:06Z")

</div>

Causes issues with drop-down menus not being usable across the site. Chrome and Firefox.

Here’s Firefox:  
TypeError: a.indexOf is not a function  
r.fn.load()  
jquery.min.js:4  
  
jquery.mCustomScrollbar.concat.min.js:5  
  
jquery.mCustomScrollbar.concat.min.js:4  
  
jquery.mCustomScrollbar.concat.min.js:4  
  
jquery.mCustomScrollbar.concat.min.js:4  
jque

And Chrome:

Uncaught TypeError: a.indexOf is not a function  
at r.fn.init.r.fn.load (jquery.min.js:4)  
at jquery.mCustomScrollbar.concat.min.js:5  
at n (jquery.mCustomScrollbar.concat.min.js:4)  
at jquery.mCustomScrollbar.concat.min.js:4  
at jquery.mCustomScrollbar.concat.min.js:5

---

<div class="post-metadata">

**Author:** ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)\
**Post date:** [March 31, 2017, 7:23pm UTC](https://forums.combatlogforums.com/t/javascript-error-on-warcraftlogs-com/3054/2 "2017-03-31T19:23:16Z")

</div>

That error is not related to dropdown menus.

---

<div class="post-metadata">

**Author:** ![GraysonCarlyle](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@GraysonCarlyle](https://forums.combatlogforums.com/u/GraysonCarlyle)\
**Post date:** [March 31, 2017, 7:34pm UTC](https://forums.combatlogforums.com/t/javascript-error-on-warcraftlogs-com/3054/3 "2017-03-31T19:34:15Z")

</div>

So the drop down menus not working half the time you load a page is something else?

---

<div class="post-metadata">

**Author:** ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)\
**Post date:** [March 31, 2017, 7:36pm UTC](https://forums.combatlogforums.com/t/javascript-error-on-warcraftlogs-com/3054/4 "2017-03-31T19:36:04Z")

</div>

Yeah. I am unable to reproduce the issue so I haven’t been able to fix it. They work fine for me, and I don’t have any reliable steps to reproduce.

---

<div class="post-metadata">

**Author:** ![Moowalker](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/moowalker/32/51_2.png) [@Moowalker](https://forums.combatlogforums.com/u/Moowalker)\
**Post date:** [April 2, 2017, 2:01pm UTC](https://forums.combatlogforums.com/t/javascript-error-on-warcraftlogs-com/3054/5 "2017-04-02T14:01:35Z")

</div>

From time to time specs menu does not work for me or all the submenus. I just reload the page and ti works.

What I did and managed to reproduce only twice was:

1. Open WCL
2. Press ![](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex029/uploads/combatlogforums/original/1X/9106f7891ab67c2a55c62f297597229c88f3c3c1.png)
3. Go at Krosus (or any other)
4. Click ![](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex029/uploads/combatlogforums/original/1X/aed44e96bc86f974b7e902b23f7900843c4407ac.png)
5. And then at the submenu that opens, there is no popup for specs.

Also, I managed to have the whole menu not responding by going to [https://www.warcraftlogs.com/rankings/10](https://www.warcraftlogs.com/rankings/10) (for example). There some times that no menu is working (no submenu) or some of the menus doesn’t have their submenu.

The errors chrome consoles reports are:

![](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex029/uploads/combatlogforums/original/1X/d80730eb069adaf3e8167cc2f4dfdbfe7f887559.png)

---

<div class="post-metadata">

**Author:** ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)\
**Post date:** [April 2, 2017, 4:05pm UTC](https://forums.combatlogforums.com/t/javascript-error-on-warcraftlogs-com/3054/6 "2017-04-02T16:05:48Z")

</div>

None of those JS errors are relevant.

Note that some people had menus break completely everywhere that had the BetterTTV Chrome extension installed. Un-installing that extension fixed their problems.

---

<div class="post-metadata">

**Author:** ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)\
**Post date:** [April 7, 2017, 3:52pm UTC](https://forums.combatlogforums.com/t/javascript-error-on-warcraftlogs-com/3054/7 "2017-04-07T15:52:14Z")

</div>

Definitely something weird going on here with intermittent menu failures in Chrome and Safari only. I didn’t change anything with these menus so trying to get to the bottom of it. It’s hard to debug, since it’s just failing occasionally for me.

Note I’m referring to the fight selection and phase selection menus on report pages, since those failing is new.

---

<div class="post-metadata">

**Author:** ![GraysonCarlyle](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@GraysonCarlyle](https://forums.combatlogforums.com/u/GraysonCarlyle)\
**Post date:** [April 7, 2017, 4:09pm UTC](https://forums.combatlogforums.com/t/javascript-error-on-warcraftlogs-com/3054/8 "2017-04-07T16:09:30Z")

</div>

Yesterday I was consistently having the problem on more than half of page reloads, so I thought I’d try things out. Disabling BetterTTV did prevent the issue from occuring again in another dozen tries. Re-enabling BetterTTV didn’t return the issue and it remained gone for the rest of the session.

I really don’t know what’s going on.

Trying again just now I got it to happen 3 times in a row, then 3 times without it happening all with the same Dell ad showing up. So it doesn’t appear to be an ad problem. 14 more reloads and it still didn’t happen.

---

<div class="post-metadata">

**Author:** ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)\
**Post date:** [April 7, 2017, 4:44pm UTC](https://forums.combatlogforums.com/t/javascript-error-on-warcraftlogs-com/3054/9 "2017-04-07T16:44:19Z")

</div>

I’m landing an update now to eliminate all of the JS errors in the console on the off chance that they are related. (I don’t think they are, but who knows.)

I am able to reproduce the issue in Safari as well as Chrome, which makes me no longer suspect Chrome as the culprit.

What this update is doing:  
(1) Moving to jQuery 3.2.0  
(2) Added in my own implementation of jQuery.browser() to fix the BBQ error and updated BBQ to latest version (fixes the JS error)  
(3) Updated mCustScrollbar to latest version (fixes the JS error)  
(4) Make sure to refresh the phases smartmenu after building it using .refresh()  
(5) Updated scrollLock library to latest version and added the correct .map file (gets rid of the JS error)
