Skip to content

Commit d4114a4

Browse files
authored
Format comment containing process.env (#6874)
1 parent 9d2757a commit d4114a4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.changeset/wild-geckos-fetch.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/util': patch
3+
---
4+
5+
Reformat a comment that causes compile errors in some build toolchains.

packages/util/src/defaults.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@ const getDefaultsFromGlobal = (): FirebaseDefaults | undefined =>
5353

5454
/**
5555
* Attempt to read defaults from a JSON string provided to
56-
* process.env.__FIREBASE_DEFAULTS__ or a JSON file whose path is in
57-
* process.env.__FIREBASE_DEFAULTS_PATH__
56+
* process(.)env(.)__FIREBASE_DEFAULTS__ or a JSON file whose path is in
57+
* process(.)env(.)__FIREBASE_DEFAULTS_PATH__
58+
* The dots are in parens because certain compilers (Vite?) cannot
59+
* handle seeing that variable in comments.
60+
* See https://github.com/firebase/firebase-js-sdk/issues/6838
5861
*/
5962
const getDefaultsFromEnvVariable = (): FirebaseDefaults | undefined => {
6063
if (typeof process === 'undefined' || typeof process.env === 'undefined') {

0 commit comments

Comments
 (0)