Fix getServerInfo (#1012)

* Return array for serverInfo.load.jobTypes

* Include start/end in invalid range assertion error
This commit is contained in:
Elliot Lee
2019-06-14 14:57:36 -07:00
committed by GitHub
parent 1be2ee5875
commit bcb80ea5f5
2 changed files with 3 additions and 2 deletions

View File

@@ -103,6 +103,7 @@ function toRippledAmount(amount: Amount): RippledAmount {
function convertKeysFromSnakeCaseToCamelCase(obj: any): any {
if (typeof obj === 'object') {
const accumulator = Array.isArray(obj) ? [] : {}
let newKey
return _.reduce(obj, (result, value, key) => {
newKey = key
@@ -113,7 +114,7 @@ function convertKeysFromSnakeCaseToCamelCase(obj: any): any {
}
result[newKey] = convertKeysFromSnakeCaseToCamelCase(value)
return result
}, {})
}, accumulator)
}
return obj
}