@salesforcedevs/dw-components 1.3.33 → 1.3.38

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": "@salesforcedevs/dw-components",
3
- "version": "1.3.33",
3
+ "version": "1.3.38",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -24,5 +24,5 @@
24
24
  "@types/setimmediate": "^1.0.2",
25
25
  "setimmediate": "^1.0.5"
26
26
  },
27
- "gitHead": "bc1e71ba19a01c9479ba93b8f827cc152c359c33"
27
+ "gitHead": "9cc8fbc4b276d28eb128f5f7fd1eec7844e831b2"
28
28
  }
@@ -13,6 +13,7 @@ const ANALYTICS_INFO = {
13
13
  elementType: "button",
14
14
  ctaClick: true
15
15
  };
16
+ const LOCAL_STORAGE_KEY = "subscriberEmail";
16
17
 
17
18
  export default class Form extends LightningElement {
18
19
  @api checkboxTextSet: string = "";
@@ -104,14 +105,11 @@ export default class Form extends LightningElement {
104
105
  }
105
106
 
106
107
  setInitialEmail() {
107
- // Set email if provided in the query param
108
- const queryString = window.location.search;
109
- const urlParams = new URLSearchParams(queryString);
110
-
111
- const subscriberEmail = urlParams.get("subscriberEmail");
112
-
108
+ // Set email if provided in the local storage
109
+ const subscriberEmail = window.localStorage.getItem(LOCAL_STORAGE_KEY);
113
110
  if (subscriberEmail) {
114
111
  this.email = subscriberEmail;
112
+ window.localStorage.removeItem(LOCAL_STORAGE_KEY);
115
113
  }
116
114
  }
117
115