Merge pull request #14780 from backstage/freben/globals

avoid globals
This commit is contained in:
Fredrik Adelöw
2022-11-22 20:18:27 +01:00
committed by GitHub
19 changed files with 212 additions and 21 deletions
@@ -241,7 +241,7 @@ export class GoogleAnalytics implements AnalyticsApi {
* Simple hash function; relies on web cryptography + the sha-256 algorithm.
*/
private async hash(value: string): Promise<string> {
const digest = await crypto.subtle.digest(
const digest = await window.crypto.subtle.digest(
'sha-256',
new TextEncoder().encode(value),
);