We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a56134b commit bae5f1eCopy full SHA for bae5f1e
packages/firestore/src/platform_browser/browser_platform.ts
@@ -27,14 +27,18 @@ export class BrowserPlatform implements Platform {
27
28
readonly emptyByteString = '';
29
30
- readonly document = document;
31
-
32
- readonly window = window;
33
34
constructor() {
35
this.base64Available = typeof atob !== 'undefined';
36
}
37
+ get document(): Document | null {
+ return typeof document !== 'undefined' ? document : null;
+ }
+
38
+ get window(): Window | null {
39
+ return typeof window !== 'undefined' ? window : null;
40
41
42
loadConnection(databaseInfo: DatabaseInfo): Promise<Connection> {
43
return Promise.resolve(new WebChannelConnection(databaseInfo));
44
0 commit comments