Skip to content

Commit

Permalink
Fix lint errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Jun 12, 2013
1 parent 5dacd9b commit 7c13851
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"curly": true,
"eqeqeq": true,
"es3": true,
"newcap": true,
"newcap": false,
"noarg": true,
"nonew": true,
"quotmark": "double",
Expand Down
10 changes: 8 additions & 2 deletions q.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ var nextTick =(function () {
var isNodeJS = false;

function flush() {
/* jshint loopfunc: true */

while (head.next) {
head = head.next;
var task = head.task;
Expand All @@ -113,9 +115,13 @@ var nextTick =(function () {
// Ensure continuation if the uncaught exception is suppressed
// listening "uncaughtException" events (as domains does).
// Continue in next event to avoid tick recursion.
domain && domain.exit();
if (domain) {
domain.exit();
}
setTimeout(flush, 0);
domain && domain.enter();
if (domain) {
domain.enter();
}

throw e;

Expand Down

0 comments on commit 7c13851

Please sign in to comment.