Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed issue: cleanup() function not call in onerror handler. #40

Closed
wants to merge 1 commit into from

2 participants

@stephanoff

Calling error() function raise exception and prevent cleanup() calling.

@jnewman
Owner

This breaks a test. I'll take a look at it in the future, but I won't merge until the tests pass...

@jnewman jnewman self-assigned this
@jnewman jnewman added the lint label
@jnewman
Owner

What was the negative side-effect of this? (Figuring out if this needs to be fixed.)

@stephanoff

@jnewman error() function called before cleanup() and this means that cleanup never been called because error will stop program execution.

@jnewman
Owner

Looked through this. We'll need to move done() out of cleanup to make it pass on the CI. (What you have will fire the success handler when the script load failed.)

@jnewman jnewman closed this in 0cf9df9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  postscribe.js
View
2  postscribe.js
@@ -448,8 +448,8 @@
},
onerror: function() {
- error({ message: 'remote script failed ' + el.src });
cleanup();
+ error({ message: 'remote script failed ' + el.src });
}
});
};
Something went wrong with that request. Please try again.