@salesforcedevs/dx-components 1.2.6-avatar-button-5 → 1.2.6-avatar-button-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.
package/package.json
CHANGED
|
@@ -339,15 +339,14 @@ export default class AvatarButton extends LightningElement {
|
|
|
339
339
|
|
|
340
340
|
const cleanUserInfo: UserInfo = {};
|
|
341
341
|
Object.entries(uncleanNextUserInfo).forEach(([key, val]) => {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
342
|
+
// uncleanUserInfo may have undefined values which we don't want in the final product
|
|
343
|
+
if (val && val !== "undefined") {
|
|
344
|
+
// Also a little extra safety to make sure we aren't injecting anything unsafe...
|
|
345
|
+
cleanUserInfo[key as keyof UserInfo] = escapeHtml(val);
|
|
345
346
|
}
|
|
346
|
-
// Also just a little extra safety to make sure we aren't injecting anything unsafe...
|
|
347
|
-
cleanUserInfo[key as keyof UserInfo] = escapeHtml(val);
|
|
348
347
|
});
|
|
349
348
|
|
|
350
|
-
// Keep the old info for any values
|
|
349
|
+
// Keep the old info for any values _not_ defined on `cleanUserInfo`
|
|
351
350
|
this.userInfo = defaults(cleanUserInfo, this.userInfo);
|
|
352
351
|
};
|
|
353
352
|
|