Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundling with rollup issues #49

Open
labopichotpi opened this issue Aug 7, 2021 · 0 comments
Open

bundling with rollup issues #49

labopichotpi opened this issue Aug 7, 2021 · 0 comments

Comments

@labopichotpi
Copy link

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--) {
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant