Skip to content

Commit

Permalink
Don't ugly error on no opts
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Farrell committed Mar 26, 2013
1 parent 7d60ab1 commit 60734a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/elasticsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var utils = require('./utils'),
Index = require('./index');

function ElasticSearch(args) {
var opts = args[0],
var opts = args[0] || {},
cb = ((args.length>1)?args[1]:undefined);
if (!(opts.index)) {
throw new Error('Must specify an index for ES.');
Expand Down

0 comments on commit 60734a2

Please sign in to comment.