Dynamic-Carousel icon indicating copy to clipboard operation
Dynamic-Carousel copied to clipboard

[BUG] Single list item triggers "Uncaught TypeError"

Open BlendedByUs opened this issue 13 years ago • 1 comments

Line 7

var oPercent = this.attr('style').match(/margin\-left:(.*[0-9])/i) && parseInt(RegExp.$1, 10);

Seems to return... Uncaught TypeError: Cannot call method 'match' of undefined.

If only one list item is present.

BlendedByUs avatar May 28 '12 23:05 BlendedByUs

Wrapping my code with if .size() > 1 seems to fix this issue but there should be sanity checking I guess in the plugin.

Thanks!

BlendedByUs avatar May 28 '12 23:05 BlendedByUs