Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't ugly error on no opts

  • Loading branch information...
commit 60734a248ea15dcdd7fa76f7f37dfae171913dd8 1 parent 7d60ab1
@gsf gsf authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/elasticsearch.js
View
2  lib/elasticsearch.js
@@ -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.');

0 comments on commit 60734a2

Please sign in to comment.
Something went wrong with that request. Please try again.