Skip to content
This repository has been archived by the owner on Aug 25, 2018. It is now read-only.

Commit

Permalink
result *is* arguments[0], so just check it
Browse files Browse the repository at this point in the history
  • Loading branch information
jdub committed Feb 5, 2011
1 parent d76f65d commit 2a03b1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shorturl
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ shorturl(longurl, opts.service, params, function(result) {
return;
}

if ( arguments[0] instanceof Error ) {
console.log('Error: ' + arguments[0].message);
if ( result instanceof Error ) {
console.log('Error: ' + result.message);
process.exit(1);
} else {
console.log(result);
Expand Down

0 comments on commit 2a03b1c

Please sign in to comment.