@salesforcedevs/dx-components 1.2.2-avatar-button-7 → 1.2.2-avatar-button-8

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/dx-components",
3
- "version": "1.2.2-avatar-button-7",
3
+ "version": "1.2.2-avatar-button-8",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -18,6 +18,7 @@
18
18
  "coveo-search-ui": "^2.10082.5",
19
19
  "debounce": "^1.2.0",
20
20
  "js-cookie": "^3.0.1",
21
+ "lodash.defaults": "^4.2.0",
21
22
  "lodash.get": "^4.4.2",
22
23
  "lodash.kebabcase": "^4.1.1",
23
24
  "microtip": "0.2.2",
@@ -27,6 +28,7 @@
27
28
  "@types/classnames": "^2.2.10",
28
29
  "@types/debounce": "^1.2.0",
29
30
  "@types/js-cookie": "^3.0.2",
31
+ "@types/lodash.defaults": "^4.2.7",
30
32
  "@types/lodash.get": "^4.4.6",
31
33
  "@types/lodash.kebabcase": "^4.1.7",
32
34
  "@types/vimeo__player": "^2.16.2"
@@ -1,6 +1,7 @@
1
1
  import { api, LightningElement } from "lwc";
2
2
  import Cookies from 'js-cookie';
3
3
  import { track } from "dxUtils/analytics";
4
+ import { defaults } from "lodash";
4
5
 
5
6
  // TODO: move to environment variable
6
7
  const TBID_BASE_URL = "https://dev1-trailblazer-identity.cs192.force.com";
@@ -323,10 +324,7 @@ export default class AvatarButton extends LightningElement {
323
324
  }
324
325
  // TODO: Consider displaying initials if no photo. Is there always a photo even if just a default one?
325
326
 
326
- this.userInfo = {
327
- ...this.userInfo,
328
- ...nextUserInfo,
329
- };
327
+ this.userInfo = defaults(nextUserInfo, this.userInfo);
330
328
  };
331
329
 
332
330
  private requestUserInfo = async () => {