Skip to content

Commit 81f41ce

Browse files
committed
Merge branch 'develop'
2 parents 30c848c + f289521 commit 81f41ce

File tree

5 files changed

+39
-3
lines changed

5 files changed

+39
-3
lines changed

.all-contributorsrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,25 @@
5252
"bug",
5353
"ideas"
5454
]
55+
},
56+
{
57+
"login": "MarcosRS",
58+
"name": "Marcos",
59+
"avatar_url": "https://avatars.githubusercontent.com/u/12486814?v=4",
60+
"profile": "https://github.com/MarcosRS",
61+
"contributions": [
62+
"bug",
63+
"ideas"
64+
]
65+
},
66+
{
67+
"login": "9swampy",
68+
"name": "9swampy",
69+
"avatar_url": "https://avatars.githubusercontent.com/u/523054?v=4",
70+
"profile": "https://github.com/9swampy",
71+
"contributions": [
72+
"bug"
73+
]
5574
}
5675
],
5776
"contributorsPerLine": 7,

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [1.2.6](https://github.com/the-bugging/react-use-downloader/compare/v1.2.5...v1.2.6) (2024-04-09)
6+
7+
8+
### Documentation
9+
10+
* update .all-contributorsrc [skip ci] ([795998a](https://github.com/the-bugging/react-use-downloader/commit/795998a25771dfe99707e62c3b4c71d8d7cc069d))
11+
* update .all-contributorsrc [skip ci] ([2cf94e5](https://github.com/the-bugging/react-use-downloader/commit/2cf94e576331684674e9d6b1f253f08b0ffac30e))
12+
* update README.md [skip ci] ([bde35c2](https://github.com/the-bugging/react-use-downloader/commit/bde35c20e122ed3e37eac8de4049314922500259))
13+
* update README.md [skip ci] ([95e9a75](https://github.com/the-bugging/react-use-downloader/commit/95e9a75a8cc5b830d1339cdfc25f07e7ce6fb40f))
14+
515
### [1.2.5](https://github.com/the-bugging/react-use-downloader/compare/v1.2.3...v1.2.5) (2024-02-17)
616

717

README.md

Lines changed: 3 additions & 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-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) |
11+
| ![Statements](https://img.shields.io/badge/statements-87.38%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%25-yellow.svg?style=flat&logo=jest) |
1212

1313
## Table of Contents
1414

@@ -122,6 +122,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
122122
<td align="center" valign="top" width="14.28%"><a href="https://heliusit.net"><img src="https://avatars.githubusercontent.com/u/7851219?v=4?s=100" width="100px;" alt="Mauro Stepanoski"/><br /><sub><b>Mauro Stepanoski</b></sub></a><br /><a href="#ideas-mastepanoski" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/the-bugging/react-use-downloader/commits?author=mastepanoski" title="Code">💻</a></td>
123123
<td align="center" valign="top" width="14.28%"><a href="http://bzbetty.blogspot.com"><img src="https://avatars.githubusercontent.com/u/533131?v=4?s=100" width="100px;" alt="Sam "Betty" McKoy"/><br /><sub><b>Sam "Betty" McKoy</b></sub></a><br /><a href="https://github.com/the-bugging/react-use-downloader/issues?q=author%3Abzbetty" title="Bug reports">🐛</a></td>
124124
<td align="center" valign="top" width="14.28%"><a href="https://github.com/peranosborn"><img src="https://avatars.githubusercontent.com/u/1318002?v=4?s=100" width="100px;" alt="Peran Osborn"/><br /><sub><b>Peran Osborn</b></sub></a><br /><a href="https://github.com/the-bugging/react-use-downloader/issues?q=author%3Aperanosborn" title="Bug reports">🐛</a> <a href="#ideas-peranosborn" title="Ideas, Planning, & Feedback">🤔</a></td>
125+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MarcosRS"><img src="https://avatars.githubusercontent.com/u/12486814?v=4?s=100" width="100px;" alt="Marcos"/><br /><sub><b>Marcos</b></sub></a><br /><a href="https://github.com/the-bugging/react-use-downloader/issues?q=author%3AMarcosRS" title="Bug reports">🐛</a> <a href="#ideas-MarcosRS" title="Ideas, Planning, & Feedback">🤔</a></td>
126+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/9swampy"><img src="https://avatars.githubusercontent.com/u/523054?v=4?s=100" width="100px;" alt="9swampy"/><br /><sub><b>9swampy</b></sub></a><br /><a href="https://github.com/the-bugging/react-use-downloader/issues?q=author%3A9swampy" title="Bug reports">🐛</a></td>
125127
</tr>
126128
</tbody>
127129
</table>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-use-downloader",
3-
"version": "1.2.5",
3+
"version": "1.2.6",
44
"description": "Creates a download handler function and gives progress information",
55
"author": "Olavo Parno",
66
"license": "MIT",

src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,12 @@ export const jsDownload = (
121121
export default function useDownloader(
122122
options: UseDownloaderOptions = {}
123123
): UseDownloader {
124-
const debugMode = process ? !!process?.env?.REACT_APP_DEBUG_MODE : false;
124+
let debugMode = false;
125+
try {
126+
debugMode = process ? !!process?.env?.REACT_APP_DEBUG_MODE : false;
127+
} catch {
128+
debugMode = false;
129+
}
125130

126131
const [elapsed, setElapsed] = useState(0);
127132
const [percentage, setPercentage] = useState(0);

0 commit comments

Comments
 (0)