Skip to content

Commit a308415

Browse files
Merge branch '8.2.x' into astaev/issue6260-8.2.x
2 parents 84ca2e5 + f0157fe commit a308415

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/igniteui-angular/src/lib/carousel/carousel.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
Output
1313
} from '@angular/core';
1414
import { IgxIconModule } from '../icon/index';
15-
import { IBaseEventArgs } from '../core/utils';
15+
import { IBaseEventArgs, PlatformUtil } from '../core/utils';
1616

1717
let NEXT_ID = 0;
1818

@@ -202,7 +202,7 @@ export class IgxCarouselComponent implements OnDestroy {
202202
private _destroyed: boolean;
203203
private _total = 0;
204204

205-
constructor(private element: ElementRef) { }
205+
constructor(private element: ElementRef, private platformUtil: PlatformUtil) { }
206206
/**
207207
*@hidden
208208
*/
@@ -465,7 +465,7 @@ export class IgxCarouselComponent implements OnDestroy {
465465
private _restartInterval() {
466466
this._resetInterval();
467467

468-
if (!isNaN(this.interval) && this.interval > 0) {
468+
if (!isNaN(this.interval) && this.interval > 0 && this.platformUtil.isBrowser) {
469469
this._lastInterval = setInterval(() => {
470470
const tick = +this.interval;
471471
if (this._playing && this.total && !isNaN(tick) && tick > 0) {

0 commit comments

Comments
 (0)