@product7/product7-js 0.6.9 → 0.7.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@product7/product7-js",
3
- "version": "0.6.9",
3
+ "version": "0.7.0",
4
4
  "description": "JavaScript SDK for integrating Product7 feedback widgets into any website",
5
5
  "main": "dist/product7-js.js",
6
6
  "module": "src/index.js",
@@ -4,10 +4,10 @@ export async function getIpInfo() {
4
4
  if (_cached) return _cached;
5
5
 
6
6
  try {
7
- const res = await fetch('http://ip-api.com/json');
7
+ const res = await fetch('https://ipwho.is/');
8
8
  if (!res.ok) return null;
9
9
  const data = await res.json();
10
- if (data.status === 'success') {
10
+ if (data.success) {
11
11
  _cached = data;
12
12
  }
13
13
  return _cached;