@blotoutio/edgetag-sdk-browser 0.10.4 → 0.10.6

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/index.js +20 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -515,7 +515,7 @@
515
515
  });
516
516
  });
517
517
  const getStandardPayload = (payload) => {
518
- const data = Object.assign({ pageUrl: getPageUrl(), pageTitle: getPageTitle(), userAgent: getUserAgent(), referrer: getReferrer(), search: getSearch(), sdkVersion: "0.10.4" }, (payload || {}));
518
+ const data = Object.assign({ pageUrl: getPageUrl(), pageTitle: getPageTitle(), userAgent: getUserAgent(), referrer: getReferrer(), search: getSearch(), sdkVersion: "0.10.6" }, (payload || {}));
519
519
  let storage = {};
520
520
  const session = getData$1('session');
521
521
  if (session) {
@@ -581,7 +581,12 @@
581
581
  const addProviderVariable = (name, variables) => {
582
582
  manifestVariables[name] = variables;
583
583
  };
584
- const getProviderVariables = (name) => manifestVariables[name] || {};
584
+ const getProviderVariables = (name) => {
585
+ if (!name) {
586
+ return {};
587
+ }
588
+ return manifestVariables[name] || {};
589
+ };
585
590
 
586
591
  let stubs = [];
587
592
  const addStubs = (newStubs) => {
@@ -644,7 +649,10 @@
644
649
  const providerData = {};
645
650
  if (providerPackages) {
646
651
  Object.values(providerPackages).forEach((pkg) => {
647
- if (!pkg || !pkg.tag || !allowProviderWithConsent(providers, pkg.name)) {
652
+ if (!pkg ||
653
+ !pkg.name ||
654
+ !pkg.tag ||
655
+ !allowProviderWithConsent(providers, pkg.name)) {
648
656
  return;
649
657
  }
650
658
  const result = pkg.tag({
@@ -680,7 +688,10 @@
680
688
  const userId = handleGetUserId();
681
689
  if (providerPackages) {
682
690
  Object.values(providerPackages).forEach((pkg) => {
683
- if (!pkg || !pkg.user || !allowProviderWithConsent(providers, pkg.name)) {
691
+ if (!pkg ||
692
+ !pkg.user ||
693
+ !pkg.name ||
694
+ !allowProviderWithConsent(providers, pkg.name)) {
684
695
  return;
685
696
  }
686
697
  pkg.user({
@@ -805,7 +816,7 @@
805
816
  }
806
817
  if (providerPackages) {
807
818
  const pkg = providerPackages[provider.package];
808
- if (pkg && pkg.init && allowProvider(pkg.name)) {
819
+ if (pkg && pkg.name && pkg.init && allowProvider(pkg.name)) {
809
820
  const initData = {
810
821
  userId,
811
822
  manifest: provider,
@@ -862,7 +873,10 @@
862
873
  const userId = handleGetUserId();
863
874
  if (providerPackages) {
864
875
  Object.values(providerPackages).forEach((pkg) => {
865
- if (!pkg || !pkg.user || !allowProviderWithConsent(providers, pkg.name)) {
876
+ if (!pkg ||
877
+ !pkg.name ||
878
+ !pkg.user ||
879
+ !allowProviderWithConsent(providers, pkg.name)) {
866
880
  return;
867
881
  }
868
882
  pkg.user({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/edgetag-sdk-browser",
3
- "version": "0.10.4",
3
+ "version": "0.10.6",
4
4
  "description": "Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",