mreq / slick-lightbox

A lightbox wrapper for Ken's amazing slick carousel.
http://mreq.github.io/slick-lightbox/
MIT License
229 stars 103 forks source link

Bug: ie9 transition duration is undefined #10

Closed marissajmc closed 9 years ago

marissajmc commented 9 years ago

slick-lightbox: v0.1.12 browser: ie9

Hello, Line 263 is throwing an error in ie9 -

return this.transitionDuration = duration.indexOf('ms') > -1 ? parseFloat(duration) : parseFloat(duration) * 1000;

Unable to get value of the property 'indexOf': object is null or undefined

This is because duration is undefined at line 262.

duration = this.modalElement.css('transition-duration');

I can fix this by explicitly setting a duration, but was wondering if there could be a better way? Whereabouts do you set the transition duration?

if (duration === undefined) {
    duration = '0.5s';
}
mreq commented 9 years ago

Nice catch, thanks! Fixed in v0.1.15.