We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c10147a commit a978efaCopy full SHA for a978efa
1 file changed
src/server/device.js
@@ -67,6 +67,11 @@ function getUserAgent(device) {
67
}
68
69
var userAgent = platformUserAgents[device['os-version']];
70
+
71
+ if (!userAgent) {
72
+ throw new Error(`Cannot find user agent for device: ${device.name}, os-version: ${device['os-version']}.`);
73
+ }
74
75
if (typeof userAgent === 'object') {
76
userAgent = userAgent[device['desktop-user-agent'] ? 'desktop' : 'phone'];
77
0 commit comments