configcat-js-ssr
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -21,9 +21,6 @@ "use strict"; | ||
.then(function (response) { | ||
var eTag = response.headers['ETag']; | ||
var eTag = response.headers.etag; | ||
if (response.status === 200) { | ||
callback(new ProjectConfig_1.ProjectConfig(new Date().getTime(), JSON.stringify(response.data), eTag)); | ||
} | ||
else if (response.status === 304) { | ||
callback(new ProjectConfig_1.ProjectConfig(new Date().getTime(), JSON.stringify(lastProjectConfig.ConfigJSON), eTag)); | ||
} | ||
else { | ||
@@ -38,8 +35,10 @@ options.logger.error("Failed to download feature flags & settings from ConfigCat. " + response.status + " - " + response.statusText); | ||
if (error.response.status === 304) { | ||
var eTag = error.response.headers['ETag']; | ||
var eTag = error.response.headers.etag; | ||
callback(new ProjectConfig_1.ProjectConfig(new Date().getTime(), JSON.stringify(lastProjectConfig.ConfigJSON), eTag)); | ||
} | ||
options.logger.error("Failed to download feature flags & settings from ConfigCat. " + error.response.status + " - " + error.response.statusText); | ||
options.logger.info("Double-check your API KEY on https://app.configcat.com/apikey"); | ||
callback(lastProjectConfig); | ||
else { | ||
options.logger.error("Failed to download feature flags & settings from ConfigCat. " + error.response.status + " - " + error.response.statusText); | ||
options.logger.info("Double-check your API KEY on https://app.configcat.com/apikey"); | ||
callback(lastProjectConfig); | ||
} | ||
} | ||
@@ -46,0 +45,0 @@ else if (error.request) { |
{ | ||
"name": "configcat-js-ssr", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "ConfigCat Feature Flags for Server Side Rendered apps like NuxtJS. Official ConfigCat SDK for Server Side Rendered to easily access feature flags.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -1,2 +0,2 @@ | ||
# ConfigCat SDK for JavaScript frontend applications | ||
# ConfigCat SDK for JavaScript Server Side Rendered applications | ||
https://configcat.com | ||
@@ -3,0 +3,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89525
184