Skip to content

Commit

Permalink
fix(dashboard): userAgentData may be undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
GerilLeto committed Sep 26, 2024
1 parent f9cb233 commit 5c4b687
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ShortcutKeyText = ({ children }: { children: ReactNode }) => {

const isMac = (function () {
// @ts-expect-error userAgentData
const p = (navigator.userAgentData.platform ?? navigator.platform).toLowerCase();
const p = (navigator.userAgentData?.platform ?? navigator.platform).toLowerCase();
return p.includes('mac');
})();

Expand Down

0 comments on commit 5c4b687

Please sign in to comment.