Răsfoiți Sursa

different way of writing renderBusinessHours

Adam Shaw 8 ani în urmă
părinte
comite
3349f51526
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      src/component/DateComponent.js

+ 2 - 2
src/component/DateComponent.js

@@ -196,13 +196,13 @@ var DateComponent = FC.DateComponent = Component.extend({
 
 
 	// Renders business-hours onto the view. Assumes updateSize has already been called.
 	// Renders business-hours onto the view. Assumes updateSize has already been called.
 	renderBusinessHours: function(businessHourPayload) {
 	renderBusinessHours: function(businessHourPayload) {
-		var dateProfile = this.get('dateProfile');
+		var unzonedRange = this.get('dateProfile').activeUnzonedRange;
 		var eventInstanceGroup = businessHourPayload[this.hasAllDayBusinessHours ? 'allDay' : 'timed'];
 		var eventInstanceGroup = businessHourPayload[this.hasAllDayBusinessHours ? 'allDay' : 'timed'];
 		var eventFootprints;
 		var eventFootprints;
 
 
 		if (eventInstanceGroup) {
 		if (eventInstanceGroup) {
 			eventFootprints = this.eventRangesToEventFootprints(
 			eventFootprints = this.eventRangesToEventFootprints(
-				eventInstanceGroup.sliceRenderRanges(dateProfile.activeUnzonedRange)
+				eventInstanceGroup.sliceRenderRanges(unzonedRange)
 			);
 			);
 		}
 		}
 		else {
 		else {