Skip to content

Commit

Permalink
fix(format-bytes): condiction order error
Browse files Browse the repository at this point in the history
  • Loading branch information
ElonH committed Jun 2, 2020
1 parent 58c8201 commit 8af6baf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/utils/format-bytes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* License: MIT
*/
export function FormatBytes(bytes: number, decimals = 2) {
if (bytes < 0 || typeof bytes !== 'number') {
if (typeof bytes !== 'number' || bytes < 0) {
return '-';
}
if (bytes === 0) {
Expand Down

0 comments on commit 8af6baf

Please sign in to comment.