From 618df42046d243092363166caa60043b2eb7f680 Mon Sep 17 00:00:00 2001 From: Estelle Poulin Date: Thu, 12 May 2022 09:47:38 -0400 Subject: [PATCH] Don't assume response object has a config property --- lib/devise.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/devise.js b/lib/devise.js index dafd1e4..fb52e36 100644 --- a/lib/devise.js +++ b/lib/devise.js @@ -19,7 +19,7 @@ return { responseError: function(response) { // Determine if the response is specifically disabling the interceptor. - var intercept = response.config.interceptAuth; + var intercept = (response.config || {}).interceptAuth; intercept = !!intercept || (interceptAuth && intercept === void 0); if (intercept && response.status === 401) {