client/api: fix null reference error

This commit is contained in:
rr- 2017-01-08 20:56:48 +01:00
parent ecf347ef6e
commit b366d8981c

View file

@ -178,7 +178,7 @@ class Api extends events.EventTarget {
return requestPromise;
})
.catch(error => {
if (error.response.name ===
if (error.response && error.response.name ===
'MissingOrExpiredRequiredFileError') {
for (let key of Object.keys(files)) {
files[key].token = null;