Skip to content

Commit c2528de

Browse files
committed
chore: adjust process.env accessing
1 parent e473b8c commit c2528de

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
| Statements | Branches | Functions | Lines |
1010
| ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
11-
| ![Statements](https://img.shields.io/badge/statements-87.96%25-yellow.svg?style=flat&logo=jest) | ![Branches](https://img.shields.io/badge/branches-73.68%25-red.svg?style=flat&logo=jest) | ![Functions](https://img.shields.io/badge/functions-81.81%25-yellow.svg?style=flat&logo=jest) | ![Lines](https://img.shields.io/badge/lines-88.65%25-yellow.svg?style=flat&logo=jest) |
11+
| ![Statements](https://img.shields.io/badge/statements-87.96%25-yellow.svg?style=flat&logo=jest) | ![Branches](https://img.shields.io/badge/branches-72.5%25-red.svg?style=flat&logo=jest) | ![Functions](https://img.shields.io/badge/functions-81.81%25-yellow.svg?style=flat&logo=jest) | ![Lines](https://img.shields.io/badge/lines-88.65%25-yellow.svg?style=flat&logo=jest) |
1212

1313
## Table of Contents
1414

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export const jsDownload = (
121121
export default function useDownloader(
122122
options: UseDownloaderOptions = {}
123123
): UseDownloader {
124-
const debugMode = process.env.REACT_APP_DEBUG_MODE;
124+
const debugMode = process ? !!process?.env?.REACT_APP_DEBUG_MODE : false;
125125

126126
const [elapsed, setElapsed] = useState(0);
127127
const [percentage, setPercentage] = useState(0);

0 commit comments

Comments
 (0)