more careful validation

This commit is contained in:
ansuz 2017-06-09 15:28:53 +02:00
parent c4e5741ae0
commit b0e00d337e
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ define([
exp.getFileListSize = function (cb) {
rpc.send('GET_TOTAL_SIZE', undefined, function (e, response) {
if (e) { return void cb(e); }
if (response && response.length) {
if (response && response.length && typeof(response[0]) === 'number') {
cb(void 0, response[0]);
} else {
cb('INVALID_RESPONSE');