@blotoutio/edgetag-sdk-js 0.6.7 → 0.6.9
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/index.cjs +17 -12
- package/index.esm.js +17 -12
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -286,7 +286,7 @@ const allowTag = (providers) => {
|
|
|
286
286
|
return false;
|
|
287
287
|
};
|
|
288
288
|
const allowProviders = (providers) => {
|
|
289
|
-
if (!providers) {
|
|
289
|
+
if (!providers || Object.keys(providers).length === 0) {
|
|
290
290
|
return true;
|
|
291
291
|
}
|
|
292
292
|
const allowedProvider = getAllowedProviders();
|
|
@@ -570,19 +570,24 @@ const handleCaptureQuery = (provider, key, persistType) => {
|
|
|
570
570
|
};
|
|
571
571
|
const handleCaptureStorage = (provider, key, persistType, location) => {
|
|
572
572
|
let data;
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
573
|
+
try {
|
|
574
|
+
switch (location) {
|
|
575
|
+
case 'cookie': {
|
|
576
|
+
data = getCookieValue(key);
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
case 'local': {
|
|
580
|
+
data = localStorage.getItem(key);
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
case 'session': {
|
|
584
|
+
data = sessionStorage.getItem(key);
|
|
585
|
+
}
|
|
584
586
|
}
|
|
585
587
|
}
|
|
588
|
+
catch (_a) {
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
586
591
|
if (!data) {
|
|
587
592
|
return;
|
|
588
593
|
}
|
package/index.esm.js
CHANGED
|
@@ -282,7 +282,7 @@ const allowTag = (providers) => {
|
|
|
282
282
|
return false;
|
|
283
283
|
};
|
|
284
284
|
const allowProviders = (providers) => {
|
|
285
|
-
if (!providers) {
|
|
285
|
+
if (!providers || Object.keys(providers).length === 0) {
|
|
286
286
|
return true;
|
|
287
287
|
}
|
|
288
288
|
const allowedProvider = getAllowedProviders();
|
|
@@ -566,19 +566,24 @@ const handleCaptureQuery = (provider, key, persistType) => {
|
|
|
566
566
|
};
|
|
567
567
|
const handleCaptureStorage = (provider, key, persistType, location) => {
|
|
568
568
|
let data;
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
569
|
+
try {
|
|
570
|
+
switch (location) {
|
|
571
|
+
case 'cookie': {
|
|
572
|
+
data = getCookieValue(key);
|
|
573
|
+
break;
|
|
574
|
+
}
|
|
575
|
+
case 'local': {
|
|
576
|
+
data = localStorage.getItem(key);
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
case 'session': {
|
|
580
|
+
data = sessionStorage.getItem(key);
|
|
581
|
+
}
|
|
580
582
|
}
|
|
581
583
|
}
|
|
584
|
+
catch (_a) {
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
582
587
|
if (!data) {
|
|
583
588
|
return;
|
|
584
589
|
}
|