Page MenuHomePhabricator

[web] move checking for desktop Safari to constant
ClosedPublic

Authored by kamil on Jun 15 2023, 4:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 1, 4:10 AM
Unknown Object (File)
Fri, Nov 1, 3:48 AM
Unknown Object (File)
Fri, Nov 1, 3:48 AM
Unknown Object (File)
Fri, Nov 1, 3:41 AM
Unknown Object (File)
Oct 7 2024, 9:06 AM
Unknown Object (File)
Sep 29 2024, 5:42 AM
Unknown Object (File)
Sep 29 2024, 5:42 AM
Unknown Object (File)
Sep 29 2024, 5:42 AM
Subscribers

Details

Summary

I misunderstood @tomek's suggestion from here: https://phab.comm.dev/D8124?id=27491#inline-52847

Moving not only function result to const but entire logic as this will not change during app lifetime (this is not true for tests but this is handled separately)

Test Plan
  1. Check if this const is truthy for Safari
  2. Check if this const is falsy for other browser (like chrome)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jun 15 2023, 4:41 AM
kamil added inline comments.
web/database/utils/db-utils.js
50 ↗(On Diff #27805)

browser && is needed because of tests, in jest function detectBrowser() returns null, and we need this value to initialize isDesktopSafari const even if this does not influence tests at all

This revision is now accepted and ready to land.Jun 15 2023, 8:23 AM