Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit da3d068

Browse files
committed
Merge branch 'base' of https://github.com/merlinsw/ui-uploader into merlinsw-base
2 parents b011c0c + 53688ba commit da3d068

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

dist/uploader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* angular-ui-uploader
33
* https://github.com/angular-ui/ui-uploader
4-
* Version: 1.1.0 - 2015-08-04T05:11:30.348Z
4+
* Version: 1.1.1 - 2015-08-05T02:10:41.396Z
55
* License: MIT
66
*/
77

@@ -70,7 +70,7 @@ function uiUploader($log) {
7070

7171
function getHumanSize(bytes) {
7272
var sizes = ['n/a', 'bytes', 'KiB', 'MiB', 'GiB', 'TB', 'PB', 'EiB', 'ZiB', 'YiB'];
73-
var i = +Math.floor(Math.log(bytes) / Math.log(1024));
73+
var i = (bytes === 0) ? 0 : +Math.floor(Math.log(bytes) / Math.log(1024));
7474
return (bytes / Math.pow(1024, i)).toFixed(i ? 1 : 0) + ' ' + sizes[isNaN(bytes) ? 0 : i + 1];
7575
}
7676

dist/uploader.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-ui-uploader",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"author": "https://github.com/angular-ui/ui-uploader/graphs/contributors",
55
"license": "MIT",
66
"homepage": "https://github.com/angular-ui/ui-uploader",

src/uploader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function uiUploader($log) {
6060

6161
function getHumanSize(bytes) {
6262
var sizes = ['n/a', 'bytes', 'KiB', 'MiB', 'GiB', 'TB', 'PB', 'EiB', 'ZiB', 'YiB'];
63-
var i = +Math.floor(Math.log(bytes) / Math.log(1024));
63+
var i = (bytes === 0) ? 0 : +Math.floor(Math.log(bytes) / Math.log(1024));
6464
return (bytes / Math.pow(1024, i)).toFixed(i ? 1 : 0) + ' ' + sizes[isNaN(bytes) ? 0 : i + 1];
6565
}
6666

0 commit comments

Comments
 (0)