1
0
mirror of https://github.com/docker/docs.git synced 2026-11-14 04:50:52 +03:00

Fix checking for expired token

This commit is contained in:
Jeffrey Morgan
2015-06-10 10:40:03 -07:00
parent e61773d185
commit 307f57416b

View File

@@ -62,7 +62,7 @@ module.exports = {
let data = JSON.parse(body);
// If the JWT has expired, then log in again to get a new JWT
if (data && data.detail.indexOf('expired') !== -1) {
if (data && data.detail && data.detail.indexOf('expired') !== -1) {
let config = this.config();
if (!this.config()) {
this.logout();