message: fix(carousel): go to a previous slide
diff: @@ -447,20 +447,23 @@ export class CarouselComponent implements AfterViewInit, OnDestroy {
  case Direction.NEXT:
  // if this is last slide, not force, looping is disabled
  // and need to going forward - select current slide, as a next
  - if (typeof this._currentActiveSlide !== 'undefined') {
  + if (typeof this._currentActiveSlide === 'undefined') {
  + nextSlideIndex = 0;
  + break;
  + }
  if (!this.isLast(this._currentActiveSlide)) {
  nextSlideIndex = this._currentActiveSlide + 1;
  break;
  }
  nextSlideIndex = !force && this.noWrap ? this._currentActiveSlide : 0;
  break;
  - }
  - nextSlideIndex = 0;
  - break;
  case Direction.PREV:
  // if this is first slide, not force, looping is disabled
  // and need to going backward - select current slide, as a next
  - if (typeof this._currentActiveSlide !== 'undefined') {
  + if (typeof this._currentActiveSlide === 'undefined') {
  + nextSlideIndex = 0;
  + break;
  + }
  if (this._currentActiveSlide > 0) {
  nextSlideIndex = this._currentActiveSlide - 1;
  break;
  @@ -470,8 +473,6 @@ export class CarouselComponent implements AfterViewInit, OnDestroy {
  break;
  }
  nextSlideIndex = this._slides.length - 1;
  - }
  - nextSlideIndex = 0;
  break;
  default:
  throw new Error('Unknown direction');
  