I have a page which contains a slideshow. It uses the views_slideshow_cycle component. However I am getting the following JS error:
Uncaught TypeError: amountVisible.indexOf is not a function
It happens on page load and then each time the browser window is resized.
The offending line is 584 in views_slideshow/contrib/views_slideshow_cycle/js/views_slideshow_cycle.js
I've output amountVisible and it is a Number. The code though looks for a '%' sign (in case the user wants a percent based value). My fix was to set amountVisible's type as a String using String(amountVisible). This seems to have worked but I was wondering if anyone had run across this issue before and could shed some light.
I have attached the patch.
Comment | File | Size | Author |
---|---|---|---|
views_slideshow_cycle-amountvisible-indexof.patch | 501 bytes | dowdy123 | |
Comments
Comment #2
kpoornima CreditAttribution: kpoornima as a volunteer and at Melity commentedComment #5
NickDickinsonWildeThanks for the report and patch! I implemented it slightly differently - checking if string first, but meant it was next to no work to do so.