Skip to content

Commit 9dcf6e6

Browse files
committed
Rearrangement.
1 parent 6bf4081 commit 9dcf6e6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/firestore/src/platform_browser/browser_platform.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ import { NoopConnectivityMonitor } from '../remote/connectivity_monitor_noop';
2525
import { BrowserConnectivityMonitor } from './browser_connectivity_monitor';
2626
import { WebChannelConnection } from './webchannel_connection';
2727

28+
// Polyfill for IE
29+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
30+
const crypto = window.crypto || (window as any).msCrypto;
31+
2832
export class BrowserPlatform implements Platform {
2933
readonly useProto3Json = true;
3034
readonly base64Available: boolean;
@@ -75,9 +79,6 @@ export class BrowserPlatform implements Platform {
7579
}
7680

7781
const v = new Uint8Array(nBytes);
78-
// Polyfill for IE
79-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
80-
const crypto = window.crypto || (window as any).msCrypto;
8182
crypto.getRandomValues(v);
8283
return v;
8384
}

0 commit comments

Comments
 (0)