Permalink
Browse files

[fix] Prevent null from being accepted as argument (#2606)

  • Loading branch information...
1 parent c46d448 commit a27802e19e60b0c4ea2d7ef8c13d1c80e52fc48e @ianbrode ianbrode committed with darrachequesne Dec 30, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/index.js
View
@@ -38,7 +38,7 @@ var clientSourceMap = undefined;
function Server(srv, opts){
if (!(this instanceof Server)) return new Server(srv, opts);
- if ('object' == typeof srv && !srv.listen) {
+ if ('object' == typeof srv && srv instanceof Object && !srv.listen) {
opts = srv;
srv = null;
}

0 comments on commit a27802e

Please sign in to comment.