handle missing user agent case

This commit is contained in:
RealBeepMcJeep 2023-08-30 12:13:36 -07:00
parent 8211e67ed7
commit ab9594fe62
1 changed files with 1 additions and 1 deletions

View File

@ -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) {