Skip to content

bundling with rollup issues #49

@labopichotpi

Description

@labopichotpi

please add var i=0 in the two for loops bellow, so that moment-business-time can be bundled correctly even with use-strict: true

@@ -241,7 +241,7 @@ moment.fn.nextWorkingTime = function nextWorkingTime() {
if (this.isWorkingDay()) {
var segments = openingTimes(this);
var openinghours, lastSegment;

  •    for(i = 0; i < segments.length; i++) {
    
  •    for(var i = 0; i < segments.length; i++) {
           openinghours = segments[i];
           lastSegment = i === segments.length -1;
           if (this.isBefore(openinghours[0])) {
    

@@ -287,7 +287,7 @@ moment.fn.lastWorkingTime = function nextWorkingTime() {
if (this.isWorkingDay()) {
var segments = openingTimes(this);
var openinghours, firstSegment;

  •    for(i = segments.length - 1; i >= 0; i--) {
    
  •    for(var i = segments.length - 1; i >= 0; i--) {
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions