Permalink
Browse files

Added check that userAgents[userAgent] does not return undefined. Dee…

…pCopy fails if device is undefined.
  • Loading branch information...
1 parent 7bd0cea commit 796cc2121eb63d83393aa6c126b093ee66a6630b @brodney brodney committed Apr 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/wurfl.js
View
@@ -15,7 +15,7 @@ function get(userAgent, deepcopy) {
var device = userAgents[userAgent];
- if(deepcopy) {
+ if(deepcopy && device !== undefined) {
device = device.deepCopy();
}

0 comments on commit 796cc21

Please sign in to comment.