JSDOc: shower.scrollToSlide return only Boolean
This commit is contained in:
parent
75686e010b
commit
4c8ecdfcdf
|
@ -342,11 +342,11 @@ window.shower = (function(window, document, undefined) {
|
||||||
/**
|
/**
|
||||||
* Scroll to slide.
|
* Scroll to slide.
|
||||||
* @param {Number} slideNumber slide number (sic!)
|
* @param {Number} slideNumber slide number (sic!)
|
||||||
* @returns {Undefined|Boolean}
|
* @returns {Boolean}
|
||||||
*/
|
*/
|
||||||
shower.scrollToSlide = function(slideNumber) {
|
shower.scrollToSlide = function(slideNumber) {
|
||||||
var currentSlide,
|
var currentSlide,
|
||||||
ret;
|
ret = false;
|
||||||
|
|
||||||
if ( ! shower._isNumber(slideNumber)) {
|
if ( ! shower._isNumber(slideNumber)) {
|
||||||
throw new Error('Gimme slide number as Number, baby!');
|
throw new Error('Gimme slide number as Number, baby!');
|
||||||
|
@ -358,7 +358,7 @@ window.shower = (function(window, document, undefined) {
|
||||||
|
|
||||||
// @TODO: WTF?
|
// @TODO: WTF?
|
||||||
if (-1 === slideNumber) {
|
if (-1 === slideNumber) {
|
||||||
return;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (slideList[slideNumber]) {
|
if (slideList[slideNumber]) {
|
||||||
|
|
Loading…
Reference in New Issue