@amedia/user 0.13.21 → 0.13.22

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": "@amedia/user",
3
- "version": "0.13.21",
3
+ "version": "0.13.22",
4
4
  "description": "Client lib for working with aID user and associated data",
5
5
  "repository": "https://github.com/amedia/amedia-user-js",
6
6
  "author": "Amedia Utvikling (ID og data)",
@@ -96,7 +96,7 @@ class UserDataRequest<
96
96
  });
97
97
  dispatch(
98
98
  new CustomEvent(AmediaUserEvents.REQUEST_USER_ATTRIBUTES, {
99
- detail: this.attributes,
99
+ detail: [...this.attributes, 'uuid'],
100
100
  })
101
101
  );
102
102
  }
@@ -130,6 +130,12 @@ class UserDataRequest<
130
130
  }
131
131
  // @ts-ignore
132
132
  if (data.state.isLoggedIn === false) {
133
+ if (
134
+ this.attributes?.includes('extraData') &&
135
+ !Object.keys(data.attributes).includes('extraData')
136
+ ) {
137
+ return; // ExtraData is valid even for logged out users
138
+ }
133
139
  resolve(data);
134
140
  return;
135
141
  }