Skip to content

Commit

Permalink
Remove unnecessary nextTick.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Apr 24, 2016
1 parent dada58a commit 3423f20
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/jsonld.js
Expand Up @@ -128,12 +128,12 @@ jsonld.compact = function(input, ctx, options, callback) {
}

var expand = function(input, options, callback) {
jsonld.nextTick(function() {
if(options.skipExpansion) {
return callback(null, input);
}
jsonld.expand(input, options, callback);
});
if(options.skipExpansion) {
return jsonld.nextTick(function() {
callback(null, input);
});
}
jsonld.expand(input, options, callback);
};

// expand input then do compaction
Expand Down

0 comments on commit 3423f20

Please sign in to comment.