File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
projects/igniteui-angular/src/lib/carousel Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import {
1212 Output
1313} from '@angular/core' ;
1414import { IgxIconModule } from '../icon/index' ;
15- import { IBaseEventArgs } from '../core/utils' ;
15+ import { IBaseEventArgs , PlatformUtil } from '../core/utils' ;
1616
1717let 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 ) {
You can’t perform that action at this time.
0 commit comments