Skip to content

Commit

Permalink
Fix crypto for Electron
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyATW committed Jun 19, 2023
1 parent d133c51 commit 1213982
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ if (teamSlug && host.indexOf(teamSlug) === 0) {
}
window.App.state.host = host;

// Hack for Electron (Cypress)
window.crypto.randomUUID =
window.crypto.randomUUID ||
(() => Math.round(Math.random() * 10 ** 16).toString());

if (!subdomain) {
// escape domain periods to not appear as regex wildcards
const subdomainMatch = window.location.host.match(
Expand Down
3 changes: 2 additions & 1 deletion src/styles/globalCss.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
@import "~bootstrap/scss/buttons";
@import "~bootstrap/scss/dropdown";
@import "~bootstrap/scss/nav";
@import "~bootstrap/scss/bootstrap";
@import "~bootstrap/scss/list-group";
@import "~bootstrap/scss/modal";
@import "~bootstrap/scss/helpers/visually-hidden";
@import "~bootstrap/scss/utilities/api";

Expand Down

0 comments on commit 1213982

Please sign in to comment.