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

Commit 4c0889c

Browse files
author
Pedro Santos
committed
fix: repo stat for string values
1 parent 4acd43e commit 4c0889c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/repo/stat.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ const Big = require('bignumber.js')
55

66
const transform = function (res, callback) {
77
callback(null, {
8-
numObjects: new Big(res.NumObjects),
9-
repoSize: new Big(res.RepoSize),
8+
numObjects: res.NumObjects,
9+
repoSize: isNaN(res.RepoSize) ? res.RepoSize : new Big(res.RepoSize),
1010
repoPath: res.RepoPath,
1111
version: res.Version,
12-
storageMax: new Big(res.StorageMax)
12+
storageMax: isNaN(res.StorageMax) ? res.StorageMax : new Big(res.StorageMax)
1313
})
1414
}
1515

0 commit comments

Comments
 (0)