diff options
Diffstat (limited to 'assets/javascripts/bootstrap/carousel.js')
-rw-r--r-- | assets/javascripts/bootstrap/carousel.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/assets/javascripts/bootstrap/carousel.js b/assets/javascripts/bootstrap/carousel.js index 7345cbe..880ac45 100644 --- a/assets/javascripts/bootstrap/carousel.js +++ b/assets/javascripts/bootstrap/carousel.js @@ -387,7 +387,10 @@ var Carousel = (function ($) { if (typeof config === 'number') { data.to(config); - } else if (action) { + } else if (typeof action === 'string') { + if (data[action] === undefined) { + throw new Error('No method named "' + action + '"'); + } data[action](); } else if (_config.interval) { data.pause(); |