Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit 8f8ab26

Browse files
committed
avoid analytics actions for local host or port forwarding
1 parent 3c5f06b commit 8f8ab26

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "saffroncodejs",
3-
"version": "2.1.9",
3+
"version": "2.2.0",
44
"description": "Package of optimised react components and javascript functions for developers ♫♪",
55
"main": "./lib/SaffronCode.js",
66
"types": "./lib/SaffronCode.d.ts",

src/analytics/Analytics.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ function run():any {
1212
let saffronDomain:string = 'https://saffroncodesdk.com/api/Projects/versioncontrol';
1313
let hostName:string = window.location.hostname;
1414

15-
// if on localhost, stop any actions.
16-
if(hostName === 'localhost') {
15+
// if on localhost, stop all actions.
16+
if( hostName === 'localhost' ||
17+
(hostName.indexOf('192.168') > -1) ) {
1718
console.log('localhost: analytics stop');
1819
return;
1920
}

0 commit comments

Comments
 (0)