Skip to content

Commit

Permalink
Format comment containing process.env (#6874)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 committed Dec 21, 2022
1 parent 9d2757a commit d4114a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/wild-geckos-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@firebase/util': patch
---

Reformat a comment that causes compile errors in some build toolchains.
7 changes: 5 additions & 2 deletions packages/util/src/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ const getDefaultsFromGlobal = (): FirebaseDefaults | undefined =>

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

0 comments on commit d4114a4

Please sign in to comment.