File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -199,10 +199,12 @@ export const User = (signal?: AbortSignal) => {
199
199
getSamUserCombinedState : async ( ) : Promise < SamUserCombinedStateResponse > => {
200
200
const res = await fetchSam ( '/api/user/v2/self/combinedState' , _ . mergeAll ( [ authOpts ( ) , { signal } ] ) ) ;
201
201
const response = await res . json ( ) ;
202
- response . terraUserAttributes = response . terraUserAttributes . map ( ( attributes ) => {
203
- const { userId : _ , ...rest } = attributes ;
204
- return rest ;
205
- } ) ;
202
+ if ( response . terraUserAttributes !== null ) {
203
+ response . terraUserAttributes = response . terraUserAttributes . map ( ( attributes ) => {
204
+ const { userId : _ , ...rest } = attributes ;
205
+ return rest ;
206
+ } ) ;
207
+ }
206
208
207
209
response . samUser . createdAt = response . samUser . createdAt ? new Date ( response . samUser . createdAt ) : undefined ;
208
210
response . samUser . registeredAt = response . samUser . registeredAt
You can’t perform that action at this time.
0 commit comments