diff --git a/src/node-saml/saml.ts b/src/node-saml/saml.ts index aee60fe4..ee4cd9c6 100644 --- a/src/node-saml/saml.ts +++ b/src/node-saml/saml.ts @@ -871,7 +871,7 @@ class SAML { } } catch (err) { debug("validatePostResponse resulted in an error: %s", err); - if (this.options.validateInResponseTo != null) { + if (this.options.validateInResponseTo) { await this.cacheProvider.removeAsync(inResponseTo!); } throw err;