Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
olavoparno committed Apr 9, 2024
2 parents 30c848c + f289521 commit 81f41ce
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,25 @@
"bug",
"ideas"
]
},
{
"login": "MarcosRS",
"name": "Marcos",
"avatar_url": "https://avatars.githubusercontent.com/u/12486814?v=4",
"profile": "https://github.com/MarcosRS",
"contributions": [
"bug",
"ideas"
]
},
{
"login": "9swampy",
"name": "9swampy",
"avatar_url": "https://avatars.githubusercontent.com/u/523054?v=4",
"profile": "https://github.com/9swampy",
"contributions": [
"bug"
]
}
],
"contributorsPerLine": 7,
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

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.

### [1.2.6](https://github.com/the-bugging/react-use-downloader/compare/v1.2.5...v1.2.6) (2024-04-09)


### Documentation

* update .all-contributorsrc [skip ci] ([795998a](https://github.com/the-bugging/react-use-downloader/commit/795998a25771dfe99707e62c3b4c71d8d7cc069d))
* update .all-contributorsrc [skip ci] ([2cf94e5](https://github.com/the-bugging/react-use-downloader/commit/2cf94e576331684674e9d6b1f253f08b0ffac30e))
* update README.md [skip ci] ([bde35c2](https://github.com/the-bugging/react-use-downloader/commit/bde35c20e122ed3e37eac8de4049314922500259))
* update README.md [skip ci] ([95e9a75](https://github.com/the-bugging/react-use-downloader/commit/95e9a75a8cc5b830d1339cdfc25f07e7ce6fb40f))

### [1.2.5](https://github.com/the-bugging/react-use-downloader/compare/v1.2.3...v1.2.5) (2024-02-17)


Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

| Statements | Branches | Functions | Lines |
| ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| ![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) |
| ![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) |

## Table of Contents

Expand Down Expand Up @@ -122,6 +122,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<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>
<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>
<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>
<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>
<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>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-use-downloader",
"version": "1.2.5",
"version": "1.2.6",
"description": "Creates a download handler function and gives progress information",
"author": "Olavo Parno",
"license": "MIT",
Expand Down
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ export const jsDownload = (
export default function useDownloader(
options: UseDownloaderOptions = {}
): UseDownloader {
const debugMode = process ? !!process?.env?.REACT_APP_DEBUG_MODE : false;
let debugMode = false;
try {
debugMode = process ? !!process?.env?.REACT_APP_DEBUG_MODE : false;
} catch {
debugMode = false;
}

const [elapsed, setElapsed] = useState(0);
const [percentage, setPercentage] = useState(0);
Expand Down

0 comments on commit 81f41ce

Please sign in to comment.