From ab9594fe62e5a4e539f3e687fc4a07f84afa7190 Mon Sep 17 00:00:00 2001 From: RealBeepMcJeep Date: Wed, 30 Aug 2023 12:13:36 -0700 Subject: [PATCH] handle missing user agent case --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 40b509de4..2847201fb 100644 --- a/server.js +++ b/server.js @@ -468,7 +468,7 @@ app.get("/notes/*", function (request, response) { app.get('/deviceinfo', function (request, response) { const userAgent = request.header('user-agent'); const deviceDetector = new DeviceDetector(); - const deviceInfo = deviceDetector.parse(userAgent); + const deviceInfo = deviceDetector.parse(userAgent || ""); return response.send(deviceInfo); }); app.get('/version', function (_, response) {