Skip to content

Commit

Permalink
make sure stsApplication is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
paulr34 committed Jan 14, 2025
1 parent 7ae88c7 commit 99bdda3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/boot/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ let query = new URLSearchParams(search)
let queryParams = new Map()
query.forEach((value, key) => queryParams.set(key, value))

// Retrieve and clean up the 'stsApplicationId' from the query parameters
let stsApplicationId = queryParams.get('stsApplicationId')?.trim() || null
// Retrieve and clean up the 'stsApplicationId' from the query parameters, set to null if not present or empty
let stsApplicationId = queryParams.get('stsApplicationId')?.trim() ?? null

// Get the current session UUID stored in sessionStorage (if any)
let currentSessionUuid = window.sessionStorage.getItem('session_uuid')
Expand All @@ -67,11 +67,11 @@ if (currentSessionUuid == null) {
`${uuidv4()}-${stsApplicationId}`
)
}
} else if (stsApplicationId !== currentStsApplicationId) {
// If the current 'stsApplicationId' differs from the one in the session, update the session UUID
}
else if (stsApplicationId && stsApplicationId !== currentStsApplicationId) {
window.sessionStorage.setItem(
'session_uuid',
`${currentSessionUuid}-${stsApplicationId}`
` ${currentSessionUuid}-${stsApplicationId}`
)
}

Expand Down

0 comments on commit 99bdda3

Please sign in to comment.