Skip to content

Commit d597e4c

Browse files
MKirovaMKirova
MKirova
authored and
MKirova
committed
chore(*): Add checks in case setter is invoked before ViewInit.
1 parent 2b5850f commit d597e4c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

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

+12-4
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,9 @@ export class IgxSliderComponent implements
389389
}
390390

391391
this._continuous = continuous;
392-
this.setTickInterval(null);
392+
if (this._hasViewInit) {
393+
this.setTickInterval(null);
394+
}
393395
}
394396

395397
/**
@@ -457,7 +459,9 @@ export class IgxSliderComponent implements
457459
// recalculate step distance.
458460
this.stepDistance = this.calculateStepDistance();
459461
this.positionHandlesAndUpdateTrack();
460-
this.setTickInterval(null);
462+
if (this._hasViewInit) {
463+
this.setTickInterval(null);
464+
}
461465
}
462466

463467
/**
@@ -503,7 +507,9 @@ export class IgxSliderComponent implements
503507
// Recalculate step distance.
504508
this.stepDistance = this.calculateStepDistance();
505509
this.positionHandlesAndUpdateTrack();
506-
this.setTickInterval(null);
510+
if (this._hasViewInit) {
511+
this.setTickInterval(null);
512+
}
507513
}
508514

509515
/**
@@ -1072,7 +1078,9 @@ export class IgxSliderComponent implements
10721078
this.positionHandle(this.thumbFrom, this.labelFrom, (this.value as IRangeSliderValue).lower);
10731079
}
10741080

1075-
this.updateTrack();
1081+
if (this._hasViewInit) {
1082+
this.updateTrack();
1083+
}
10761084
}
10771085

10781086
private closestHandle(event: PointerEvent) {

0 commit comments

Comments
 (0)