expf-sigma-node.js 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/sigma.js +2 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expf-sigma-node.js",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "expf-sigma-node.js lets you manage features flags and remote config across web, server side applications. Deliver true Continuous Integration. Get builds out faster. Control who has access to new features.",
5
5
  "main": "public/sigma.js",
6
6
  "keywords": [
package/public/sigma.js CHANGED
@@ -997,7 +997,7 @@ var Sigma = class {
997
997
  try {
998
998
  if (!this.userData.geo) {
999
999
  const userGeoData = await this.getUserGeoData();
1000
- if (!this.cache.get(sigmaGeoData) || this.cache.get(sigmaGeoData, { location: "none" }) && userGeoData) {
1000
+ if (!this.cache.get(sigmaGeoData) || userGeoData) {
1001
1001
  this.cache.set(sigmaGeoData, JSON.stringify(userGeoData));
1002
1002
  }
1003
1003
  } else {
@@ -1005,7 +1005,6 @@ var Sigma = class {
1005
1005
  }
1006
1006
  } catch (error) {
1007
1007
  this.cache.set(sigmaGeoData, JSON.stringify({ location: "none" }));
1008
- console.error(error);
1009
1008
  }
1010
1009
  let data;
1011
1010
  try {
@@ -1046,7 +1045,7 @@ var Sigma = class {
1046
1045
  this.cache.get("sigmaDataFileLastUpdate")
1047
1046
  );
1048
1047
  const currentTime = Math.floor(Date.now() / 1e3);
1049
- if (currentTime > lastUpdate + this.cacheTTL) {
1048
+ if (currentTime > lastUpdate + this.cacheTTL || this.userData.geo) {
1050
1049
  return true;
1051
1050
  }
1052
1051
  return false;