Ver Fonte

different way of writing renderBusinessHours

Adam Shaw há 8 anos atrás
pai
commit
3349f51526
1 ficheiros alterados com 2 adições e 2 exclusões
  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.
 	renderBusinessHours: function(businessHourPayload) {
-		var dateProfile = this.get('dateProfile');
+		var unzonedRange = this.get('dateProfile').activeUnzonedRange;
 		var eventInstanceGroup = businessHourPayload[this.hasAllDayBusinessHours ? 'allDay' : 'timed'];
 		var eventFootprints;
 
 		if (eventInstanceGroup) {
 			eventFootprints = this.eventRangesToEventFootprints(
-				eventInstanceGroup.sliceRenderRanges(dateProfile.activeUnzonedRange)
+				eventInstanceGroup.sliceRenderRanges(unzonedRange)
 			);
 		}
 		else {