@data-fair/lib-vue 1.15.3 → 1.15.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/session.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-vue",
3
- "version": "1.15.3",
3
+ "version": "1.15.4",
4
4
  "description": "Composables and other utilities for Vue applications in the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [
package/session.js CHANGED
@@ -178,11 +178,11 @@ export async function getSession (initOptions) {
178
178
  cookies.remove('id_token_dep')
179
179
  goTo(redirect ?? options.logoutRedirectUrl ?? null)
180
180
  }
181
- const switchOrganization = (org, dep) => {
181
+ const switchOrganization = (org, dep, updateState = true) => {
182
182
  const cookieOpts = { path: cookiesPath }
183
183
  if (org) { cookies.set('id_token_org', org, cookieOpts) } else { cookies.remove('id_token_org', cookieOpts) }
184
184
  if (dep) { cookies.set('id_token_dep', dep, cookieOpts) } else { cookies.remove('id_token_dep', cookieOpts) }
185
- readState()
185
+ if (updateState) { readState() }
186
186
  }
187
187
  const setAdminMode = async (adminMode, redirect) => {
188
188
  if (adminMode) {