Skip to content

Commit

Permalink
make chrome check safe if name is not specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabehopper committed Oct 23, 2015
1 parent 7ece6ce commit af9ba8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
} else if (req.query['agent'] === type) {
agentTypes.push(req.query['agent']);
newVal = '1';
} else if (type === 'Chrome' &&agent.Browser.name == 'chrome' ) {
} else if (type === 'Chrome' && (agent.Browser && agent.Browser.name == 'chrome' )) {
agentTypes.push(type);
newVal = '1';
}
Expand Down

0 comments on commit af9ba8c

Please sign in to comment.