From 4cec4f066dfcf23fe787308ccc6a1d29ea6c3f5d Mon Sep 17 00:00:00 2001 From: Kegsay Date: Tue, 6 Jun 2017 12:38:06 +0100 Subject: [PATCH] Fix #4191: add defaults to avoid throwing (#4195) --- src/vector/platform/WebPlatform.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vector/platform/WebPlatform.js b/src/vector/platform/WebPlatform.js index 8397a7f70..b9e941e63 100644 --- a/src/vector/platform/WebPlatform.js +++ b/src/vector/platform/WebPlatform.js @@ -160,8 +160,8 @@ export default class WebPlatform extends VectorBasePlatform { const appName = u.format(); const ua = new UAParser(); - const browserName = ua.getBrowser().name; - const osName = ua.getOS().name; + const browserName = ua.getBrowser().name || "unknown browser"; + const osName = ua.getOS().name || "unknown os"; return _t('%(appName)s via %(browserName)s on %(osName)s', {appName: appName, browserName: browserName, osName: osName}); }