Page MenuHomePhabricator

D13588.diff
No OneTemporary

D13588.diff

diff --git a/keyserver/src/responders/website-responders.js b/keyserver/src/responders/website-responders.js
--- a/keyserver/src/responders/website-responders.js
+++ b/keyserver/src/responders/website-responders.js
@@ -207,7 +207,7 @@
const { secret } = req.params;
const userAgent = req.get('User-Agent');
const detectionResult = detectBrowser(userAgent);
- if (detectionResult.os === 'Android OS') {
+ if (detectionResult?.os === 'Android OS') {
const isSecretValid = inviteSecretRegex.test(secret);
const referrer = isSecretValid
? `&referrer=${encodeURIComponent(`utm_source=invite/${secret}`)}`
@@ -218,7 +218,7 @@
});
res.end();
return;
- } else if (detectionResult.os !== 'iOS') {
+ } else if (detectionResult?.os !== 'iOS') {
const urlFacts = getWebAppURLFacts();
const baseDomain = urlFacts?.baseDomain ?? '';
const basePath = urlFacts?.basePath ?? '/';

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 5:09 AM (20 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2583037
Default Alt Text
D13588.diff (924 B)

Event Timeline